• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Password authentication
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Password authentication


  • Subject: Re: Password authentication
  • From: Daniel Wambold <email@hidden>
  • Date: Thu, 13 Feb 2014 18:38:02 -0500

Jens-
You are absolutely correct, and I should have been more clear. The "authenticated" part is simply so you can provide feedback to the user. ("Your password was wrong.") Replacing the password file could (assuming you knew the process) allow one to achieve "authenticated" status, but the decrypted 256 bit number would not be a valid key for the encrypted data thereafter. Any sensitive information should be encrypted with the 256 bit key, since it will be unreadable without the correct password file _as well as_ the correct password.
Regards,
Dan


On Feb 13, 2014, at 5:58 PM, Jens Alfke wrote:


On Feb 13, 2014, at 2:28 PM, Daniel Wambold <email@hidden> wrote:

> I have hacked together a brief sample app illustrating how I prefer to do password authentication. It does not use the keychain, which can be useful as well. If it's of any interest or use, feel free. It's called "MyAuthenticator," which is the first thing listed on the page below. If I understood your goal, you wanted the user to authenticate themselves to the program (via a password) so you could reveal other, sensitive data? If so, this does just that.

It doesn't provide much security, though. Although reading the password file is harmless (because it's been hashed), the file can be _replaced_ with one created by the attacker that matches a password they know. Then they can log in. Also, unless the underlying sensitive data is encrypted, an attacker could grope into the app's data directory and read it.

To use this kind of password-based symmetric-key encryption securely, the _data_ to be protected has to be encrypted. So once the user's entered the password and you've derived an AES key from it, you use that key to decrypt the data file. If the decryption results in invalid data, the password was wrong.

—Jens

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Password authentication
      • From: Jens Alfke <email@hidden>
References: 
 >Password authentication (From: Daniel Wambold <email@hidden>)
 >Re: Password authentication (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Prevent autoloading of last opened document
  • Next by Date: Re: Prevent autoloading of last opened document
  • Previous by thread: Re: Password authentication
  • Next by thread: Re: Password authentication
  • Index(es):
    • Date
    • Thread