Tag Info

Hot answers tagged

10

This depends on the public-key system (algorithm). For RSA, technically the private and public key (i.e. the exponents, the keys share the same modulus) are symmetric, you can swap them, and it still works. But you usually don't want to do this: The public exponent is usually a small number (like $3$ or $2^{16} + 1$) in order to speed up ...


8

It looks like, given your adversary model, things should be secure. HMAC as a randomness extractor has been shown to be good, especially when we can assume the hash function is collision resistant. That paper also has some results which tell how you could guard against the collision resistance being broken (basically use a hash function with larger output ...


2

There are two inputs to PBKDF2, and key derivation functions in general: the password and a salt. Assuming the attacker knows the salt, all the password hash can do is slow down a brute force or dictionary search (i.e. 1000x the complexity of HMAC with PBKDF2 default iterations), as well as force the attacker to search for each user's password individually. ...


2

There are many possibilities here, depending on the particulars of where exactly you will use it. Your use case may require a random looking derived key, where the 1024 bytes of entropy have been distributed evenly over all the bytes of the final key. In that case there's no avoiding a key derivation function. You will have to use either a block cipher, a ...


2

CryptGenRandom is supposed to produce cryptographically strong random numbers, so you shouldn't need to process it before using as a key. However, if you want to treat it as of suspect quality, I would go with SP 800-90B recommendations: assume it has entropy at least half the bits, so request double what you need. Then run it through HMAC with a suitable ...


2

The once part inside of the nonce in CTR mode means effectively "once for this particular key". If you use a fresh key for each message (e.g. by encrypting it using public-key crypto or similar), you can use the same nonce for all the messages (or a size-zero nonce). The important part is that the combination of nonce and ctr-value (i.e. what is input into ...


2

It seems that you are trying to implement your own KBKDF (Key Based Key Derivation Function) using HMAC. Maybe it is better to use a pre-defined one. It would be more sensible maybe to use an HSM that is FIPS certified for NIST SP 800-108. These use one of the KBKDFs defined in NIST SP 800-108. You can still use the idea of the random by putting it in the ...


2

Short answer, before someone marks this as a duplicate or answers it with an essay or something: You're exactly right. This was one of the biggest consequences of the infamous Heartbleed exploit in OpenSSL, which exposed the memory of processes using OpenSSL for TLS to anyone with an Internet connection. It's also significant for cold boot attacks, where ...


1

Related to Curve25519 Curve25519 seems to be secure so far. Yet, you have to remind yourself that Dr. Bernstein specified Curve25519 for key-exchange. Meaning: key-generation, transaction signing, and verification are somewhat different beasts – you might want to cross-check on that before jumping toward Curve25519. Sure, Curve25519-java supports signing… ...



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