Reputation
341
Top tag
Next privilege 350 Rep.
Access review queues
Badges
3 11
Impact
~12k people reached

  • 0 posts edited
  • 0 helpful flags
  • 16 votes cast
Jan
30
comment Best way to get 32 bytes from PBKDF2
@CodesInChaos Making sure I understand you correctly: your suggestion of using PBKDF2 twice means: feeding the 20 byte output as the "password" for the single iteration run (and reusing the original salt). Is that it? About your second suggestion of simply hashing the result: Now I'm really confused - if it's that simple (since we're not getting any more entropy than our password+salt anyway) - why did they invent HKDF-Expand at all?
Jan
30
comment Best way to get 32 bytes from PBKDF2
@CodesInChaos Thanks. You might as well turn these comments (and to my previous question) into answers so I can upvote them.
Jan
30
revised Best way to get 32 bytes from PBKDF2
edited body
Jan
30
revised Best way to get 32 bytes from PBKDF2
edited body
Jan
30
asked Best way to get 32 bytes from PBKDF2
Jan
29
comment Derive both MAC and AES keys from same PBKDF2?
@CodesInChaos I'm searching it now, but can't seem to find anything less technical than this (or just general descriptions like "is a simple HMAC-based KDF...".
Jan
29
comment Derive both MAC and AES keys from same PBKDF2?
@CodesInChaos Thanks. Is there any .net implementation of HKDF (or better yet, of a well designed password based key derivation functions)?
Jan
29
comment Derive both MAC and AES keys from same PBKDF2?
@CodesInChaos From the second link: PBKDF2 supports the generation of arbitrary amounts of key data. (I'm using Rfc2898DeriveBytes if it matters.)
Jan
29
asked Derive both MAC and AES keys from same PBKDF2?
Dec
13
awarded  Popular Question
May
8
revised What length should the padding be when encrypting or signing with RSA?
deleted 29 characters in body; edited title
May
5
accepted What length should the padding be when encrypting or signing with RSA?
May
5
comment What length should the padding be when encrypting or signing with RSA?
Oh.. and thank you very much for your answer!
May
5
comment What length should the padding be when encrypting or signing with RSA?
@JohnDeters I don't care if two identical messages yield the same output. I'm trying to implement a licensing system. (See my comments to fgrieu's answer and my other recent question on the site .) And I'm mainly concerned with signing.
May
5
comment What length should the padding be when encrypting or signing with RSA?
a) I should calculate a separate padding (is that the term instead of salt?) for each computer (in a random-like manner). And perhaps add a really-random part to it. b) The padding should be at least $256 + (2/3) n$ bits (which, if $n$ is 2048 - would leave me with a maximum of 426 bits (=53 bytes) for the computer-id (or its hash). Did I understand correctly?
May
5
comment What length should the padding be when encrypting or signing with RSA?
So... I understand from your answer that in the signature scheme where (as a licensing system) I'm signing a user's computer's hardware-id and returning it to the user's computer - having my application on that computer verify that the returned value is indeed the signed hardware-id: the following will be true:
May
3
comment What length should the padding be when encrypting or signing with RSA?
@fgrieu I'm converting a byte array to a BigInteger but first concatenating a new byte array to the end of the original one (before converting to BigInteger) and using that as $m$ in $m^d \bmod n$.
May
3
comment What length should the padding be when encrypting or signing with RSA?
@fgrieu concatenation. $(m+salt)^d \bmod n$ - Thanks. I was looking for that formatting.
May
3
comment What length should the padding be when encrypting or signing with RSA?
@fgrieu m^d mod n VS (m+salt)^d mod n
May
3
revised What length should the padding be when encrypting or signing with RSA?
deleted 23 characters in body; edited title