Tag Info

Hot answers tagged

3

Actually you are quite near on implementing PBKDF2. It is kind of iterated HMAC execution. So have a look here and just implement the missing parts: PBKDF2


2

That's a lot of questions, I'll try and answer in order. A hash or message digest alone is not secure because anybody can calculate and thus substitute a hash value. If you (correctly) add a key to the mix then you get a HMAC, which can be used. Nowadays often a HMAC is used, or an authenticated mode of authentication such as GCM, CCM (for packet ...


1

Since your HMAC key is held in the same database as the passwords you shouldn't count on it to do anything... If the attackers get the passwords, they get the HMAC key. So HMAC doesn't prevent brute forcing, and a password hashing function would provide both points 1 and 2 above. Depending on your timeline you may want to consider using whatever function ...


1

Yes, and that's how it's normally done. This even applies to AEAD schemes like GCM, CCM, and EAX (which all encrypt with CTR and MAC as a separate matter with some other algorithm); with non-AEAD schemes, you have systems like CBC+HMAC in TLS, and (with stream ciphers for encryption) ChaCha20+Poly1305 (which are two completely independent algorithms). ...


1

SHA-256 is defined for inputting and outputting binary data using bits. Most libraries only perform calculations based on byte input instead of bit input though. So in general, SHA-256 operates on bytes, not on characters. You need to explicitly encode your characters to to bytes using character encoding such as UTF-8 to use SHA-256. Some platforms have an ...


1

Does your embedded device have access to a random input source and a bidirectional channel? If not, then there will only ever be as much entropy on the chip as you put on it to begin with, so there's no purpose in updating the key. If so, then just do an authenticated key exchange and generate a new shared symmetric key occasionally. ECC is best for ...



Only top voted, non community-wiki answers of a minimum length are eligible