instruction
stringlengths
15
30k
There are plenty of papers on forward-secure IBE, one could just google that term. <br> Here, I will focus on IBE with a property that I would call "key forgetting", <br> and work toward a candidate construction for depth-O(1) HIBE with that property. One could apply either of the sections "Random Oracles, depth...
1. First off, the maximum size of a message you can use is determined by the desired length of the padding (in my case, I am using RSA-2048 so I wanted a final padded length of 256 bytes) and the hash function you are using. The formula is `messageLength = desiredLength - 2 * hashOutputSize - 1` (in my case, I want...
As I understand it, CTR mode essentially turns a block cipher into a stream cipher like so: _______________ | | | | nonce | i | |_______|_______| | _______V_______ | | | block ciphe...
Why does CTR mode XOR the plaintext into the output of the block cipher rather than XORing the plaintext into the input of the block cipher?
I'll comment only the statement referring to an AES-256 replacement with 4096-bit key: > According to our engineers, this will take 23840 times longer to crack than aes256 Bob writing that is not able to correctly transcribe even the numbers that engineer Alice allegedly spelled: most likely, $23840$ is intended to...
Dropbox uses CRC32 and md5 to create a checksum of each 4 mb "block" as part of the their compression/file system. I suspect that Dropbox uses an additional cryptographic hash to check if there's a collision, but let's assume that doesn't happen. Is using CRC32 and md5 in combination cryptographically secure?
Is Dropbox's hashing method cryptographically secure?
Neither CRC32 (a checksum), nor MD5 (a not-collision-resistant hash) are cryptographically insecure. Even if they were, Dropbox doesn't base it's file-storage on a checksum and/or colliding hash. In other words: it's not as if they simply take your upload, cut it up in 4mb parts and throw it into MD5 to prevent du...
Neither CRC32 (a checksum), nor MD5 (a not-collision-resistant hash) are cryptographically insecure. Even if they were, Dropbox doesn't base it's file-storage on a checksum and/or colliding hash. In other words: it's not as if they simply take your upload, cut it up in 4mb parts and throw it into MD5 to prevent du...
Neither CRC32 (a “cyclic redundancy check” algorithm, aka “error-detecting code”), nor MD5 (a not-collision-resistant hash) are cryptographically secure. Even if they were, Dropbox doesn't base it's file-storage on a checksum and/or colliding hash. In other words: it's not as if they simply take your upload, cut i...
Neither CRC32 , nor MD5 are cryptographically secure. MD5 has known collision weaknesses and is therefore not to be considered cryptographically secure anymore. And CRC32 isn't even a hash… it's a “cyclic redundancy check” algorithm, which produces an “error-detecting code”. Cyclic redundancy checks are not and were ne...
Neither CRC32 , nor MD5 are cryptographically secure. MD5 has known collision weaknesses and is therefore not to be considered cryptographically secure anymore. And CRC32 isn't even a hash… it's a “cyclic redundancy check” algorithm, which produces an “error-detecting code”. Cyclic redundancy checks are not and were ne...
Is there a way of convincing someone on (in)validity of Diffie Hellman tuple $<g, g^u, g^v, g^{w}>$ without giving away $u,v$. or at least solve the Decisional Diffie Hellman Problem without revealing $u,v$. [Considering the prover knows exactly one of $u$ or $v$]? I would appreciate references to papers (howe...
I am always on the look out for privacy enhancing technologies. I stumbled upon the service from unseen.is. I had a look at their site (specifically [here](https://unseen.is/#p2)) and even though I lack knowledge there are a few early warning signs: > a former security contractor told us "if it's publicly available,...
That depends on the groups you are working in. If you are working in a gap Diffie Hellman group setting, i.e., a setting where the DDH is easy but the CDH is still hard, that is easy without interactive proofs. For instance, take a symmetric cryptographic pairing $e:G\times G \rightarrow G_T$ where $G$ is an ellipti...
That depends on the groups you are working in. If you are working in a gap Diffie Hellman group setting, i.e., a setting where the DDH is easy but the CDH is still hard, that is easy without interactive proofs. For instance, take a symmetric cryptographic pairing $e:G\times G \rightarrow G_T$ where $G$ is an ellipti...
Neither CRC32 , nor MD5 are cryptographically secure. MD5 has known collision weaknesses and is therefore not to be considered cryptographically secure anymore. And CRC32 isn't even a hash… it's a “cyclic redundancy check” algorithm, which produces an “error-detecting code”. Cyclic redundancy checks are not and were ne...
I have some encrypted texts (encrypted with 3DES in ECB mode without salt). **My question:** How can I decrypt them using a wordlist? (or without one) Example: Encrypted text: Xfi+h4Ir6l7zXCP+N4EPvQ== The wordlist for this: foo bar marketing The original text was before encrypting was: "...
How to decrypt 3DES in ECB mode (using a wordlist)?
I have some encrypted texts (encrypted with 3DES in ECB mode without salt). **My question: How can I decrypt them using a wordlist? (or without one)** Example: Encrypted text: Xfi+h4Ir6l7zXCP+N4EPvQ== The wordlist for this: foo bar marketing The original text was before encrypting was: "...
Neither CRC32 , nor MD5 are cryptographically secure. MD5 has known collision weaknesses and is therefore not to be considered cryptographically secure anymore. And CRC32 isn't even a hash… it's a “cyclic redundancy check” algorithm, which produces an “error-detecting code”. Cyclic redundancy checks are not and were ne...
Neither CRC32 , nor MD5 are cryptographically secure. MD5 has known collision weaknesses and is therefore not to be considered cryptographically secure anymore. And CRC32 isn't even a hash… it's a “cyclic redundancy check” algorithm, which produces an “error-detecting code”. Cyclic redundancy checks are not and were ne...
HMAC seems a bit complicated. Why can't we use $H(m||k)$ as a MAC? Unlike $H(k||m)$, length extension attacks won't work. Is there some other obvious attack?
Why don't we use H(m||k) as a MAC?
That depends on the groups you are working in. **Using a $\Sigma$-protocol** If you have a group $G$ of prime order $q$ where the DDH is hard and you have a DH tuple $(g,g^u,g^v,g^w)$ with $w\equiv uv \pmod q$, then if your prover knows one of these values, say $u$, then we can write the DH tuple as $(g,g^u,h,...
According to Bruce Schneier the constants used in the spec of `DUAL_EC_DRBG` may be related to a secret set of numbers, that could function as a master key for encryption using on this random number generator: > This is how it works: There are a bunch of constants -- fixed numbers -- in the standard used to define t...
Is it possible to calculate the 'skeleton key' for DUAL_EA_DRBG? What would it take?
I have some ideas floating around my head for exploring hashing functions, but I want to make sure what I think I know is actually true, before basing a house of cards on it :) Let’s start with some things I’m reasonably sure of, but are still probably wrong: * A hash function is one such that for any given ...
That depends on the groups you are working in. **Using a $\Sigma$-protocol** If you have a group $G$ of prime order $q$ where the DDH is hard and you have a DH tuple $(g,g^u,g^v,g^w)$ with $w\equiv uv \pmod q$, then if your prover knows one of these values, say $u$, then we can write the DH tuple as $(g,g^u,h,...
Is it possible to calculate the 'skeleton key' for DUAL_EC_DRBG? What would it take?
That depends on the groups you are working in. **Using a $\Sigma$-protocol** If you have a group $G$ of prime order $q$ where the DDH is hard and you have a DH tuple $(g,g^u,g^v,g^w)$ with $w\equiv uv \pmod q$, then if your prover knows one of these values, say $u$, then we can write the DH tuple as $(g,g^u,h,...
That depends on the groups you are working in. **Using a $\Sigma$-protocol** If you have a group $G$ of prime order $q$ where the DDH is hard and you have a DH tuple $(g,g^u,g^v,g^w)$ with $w\equiv uv \pmod q$, then if your prover knows one of these values, say $u$, then we can write the DH tuple as $(g,g^u,h,...
I've found this attack to be poorly documented, all-in-all. Below is a technical explanation of the matter, or one can skip to the conclusion if uninterested in the details. # Dual_EC_DRBG First, let me give a short description of Dual_EC_DRB using the notation of Shumow and Ferguson (see [the presentation](http://...
I've found this attack to be poorly documented, all-in-all. Below is a technical explanation of the matter, or one can skip to the conclusion if uninterested in the details. # Dual_EC_DRBG First, let me give a short description of Dual_EC_DRBG using the notation of Shumow and Ferguson (see [the presentation](http:/...
I have been working on a challenge i found on the internet. It is as follows: > You've stumbled onto a significant vulnerability in a commonly used cryptographic library. It turns out that the random number generator it uses frequently produces the same primes when it is generating keys. > Exploit this knowledge ...
Tony Arcieri makes an interesting point in his [Imperfect Forward Secrecy](http://tonyarcieri.com/imperfect-forward-secrecy-the-coming-cryptocalypse) article which basically boils down to: 1. large entities such as NSA are storing encrypted internet traffic, also what's to stop smaller entities such as proxy owners ...
Consider a common practically-collision-resistant hash function $\mathcal{H}$ (e.g. [SHA-1][2], [SHA-256][4], [SHA-512][5], [RIPEMD-160][3]), perhaps based on the [Merkle–Damgård construction][1] as are the first three. We define a [Message Authentication Code][6] $\mathcal{C}$ $$(k,m) \mapsto \mathcal{C}(k,m)=\mathca...
Tony Arcieri makes an interesting point in his [Imperfect Forward Secrecy](http://tonyarcieri.com/imperfect-forward-secrecy-the-coming-cryptocalypse) article which basically boils down to: 1. large entities such as NSA are storing encrypted internet traffic, also what's to stop smaller entities such as proxy owners ...
I am looking at ways to speed up modular reduction for the polynomial 2^256 - 2^32 - 2^9 - 2^8 - 2^7 - 2^6 - 2^4 - 1 I have read the paper "Generalized Mersenne numbers" by JA Solinas, but it does not seem to list this form of polynomial as a candidate for fast modular reduction (see section 10). Using the ...
My app on Android uses the built-in motion sensors to collect seed-data for the PRNG (java.security.SecureRandom) that is later to be used for key-generation. The user is told to shake the device so the incoming data should be somewhat pretty random. Also, too slow movements are ignored in order to avoid getting only ...
I am looking at ways to speed up modular reduction for the polynomial $$2^{256}-2^{32}-2^9-2^8-2^7-2^6-2^4-1$$ I have read the paper "[Generalized Mersenne numbers][1]" by J.A. Solinas, but it does not seem to list this form of polynomial as a candidate for fast modular reduction (see section 10). Using the...
I am looking at ways to speed up modular reduction for the polynomial $$2^{256}-2^{32}-2^9-2^8-2^7-2^6-2^4-1$$ I have read the paper "[Generalized Mersenne numbers][1]" by J.A. Solinas, but it does not seem to list this form of polynomial as a candidate for fast modular reduction (see section 10). Using the...
I have some ideas floating around my head for exploring hashing functions, but I want to make sure what I think I know is actually true, before basing a house of cards on it :) Let’s start with some things I’m reasonably sure of, but are still probably wrong: * A hash function is one such that for any given st...
I am trying to design a file exchange protocol for learning purposes, inspired by PGP, but fixing some of its shortcomings. Assuming the machine where the creation and decryption of the file happens are secure, the threat is a passive (reading file) or active (manipulating file) attacker on the line. These attrib...
My app on Android uses the built-in motion sensors to collect seed-data for the PRNG (java.security.SecureRandom) that is later to be used for key-generation. The user is told to shake the device so the incoming data should be somewhat pretty random. Also, too slow movements are ignored in order to avoid getting only ...
As everyone is now aware, [Mt Gox has declared bankruptcy][1]. As what appears to be the very last thing they did, Mt Gox accepted my $35 and fulfilled my special Mt Gox [Yubikey][2]. Having just arrived in the mail, I can now rest assured that my Mt Gox account, if it still existed, and all those bitcoins, if they wer...
Any use for now-defunct Mt Gox Yubikey?
I can't agree with bullet 3. of the question stating _quantum computers are getting stronger with a good pace (82-qbit computer last year, 512-qbit computer this year)_, at least in a context of cryptanalysis. Even the marketing people praising the device alluded to do not pretend that it is of a kind useful for cry...
What key exchange protocols give Forward-Secrecy?
I'm experimenting with creating an entropy source for an environment where I have no hardware available and the language is very high level (executed in a virtual machine). I know it's not a good idea but I don't have /dev/random or CryptoAPI and the only possible sources are things like http://random.org but they need...
I can't agree with bullet 3. of the question stating _quantum computers are getting stronger with a good pace (82-qbit computer last year, 512-qbit computer this year)_, at least in a context of cryptanalysis. Even the marketing people praising the device alluded to do not pretend that it is of a kind useful for cry...
I can't agree with bullet 3. of the question stating _quantum computers are getting stronger with a good pace (82-qbit computer last year, 512-qbit computer this year)_, at least in a context of cryptanalysis. Even the marketing people praising the device alluded to do not pretend that it is of a kind useful for cry...
The computational Diffie-Hellman problem states that for a cyclic group $G$ of order $p$ and a generator $g$, it is hard to find the value $g^{xy}$ given only $g^x$ and $g^y$ (but easy if either $x$ or $y$ is known); the easiest way being to compute the discrete logarithm of either $g^x$ or $g^y$ and then calculating $...
Why is "multiplying" $g^x$ and $g^y$ not possible?
What key exchange protocols give Forward-Secrecy resisting future progress?
I've read a paper that says that one of the "assumptions" that it makes is secure broadcast. Why is this an assumption? Can't a broadcast channel be built with simple primitives--i.e. encrypt and sign messages with a shared key? And, assuming that there is something more that I'm missing, how are broadcast channels ...
I have some ideas floating around my head for exploring hashing functions, but I want to make sure what I think I know is actually true, before basing a house of cards on it :) Let’s start with some things I’m reasonably sure of, but are still probably wrong: * A hash function is one such that for any given st...
Exploration through RFCs concludes that random numbers used in the creation of Master Key and Key Block(Key material for Encryption Key and Mac Secret) are from ServerHello.random and ClientHello.random. Only these random numbers are used in both the cases. No separate Client and Server randoms for Key Block and Master...
why inverse in diffie-hellman protocol will not give same value?
The security behind DH is the computational DH problem, i.e., an eavesdropper learning $g^a$ and $g^b$ cannot compute the shared secret $K=g^{ab}$. But clearly the two parties can as they hold $b$ and $a$ respectively. So for instance the party holding $a$ and received $g^b$ can compute $(g^a)^b$. If you want to comput...
Is MITM attack theoretically possible after public/private key pair exchange is done successfully. Say Alice and Bob have genuine public keys of each other. Is MITM possible further during authentication phase between Alice and Bob?
Is MITM possible after key exchange phase done successfully in RSA?
The security behind DH is the computational DH problem, i.e., an eavesdropper learning $g^a$ and $g^b$ cannot compute the shared secret $K=g^{ab}$. But clearly the two parties can as they hold $b$ and $a$ respectively. So for instance the party holding $a$ and received $g^b$ can compute $(g^a)^b$. Both parties holding ...
I have read many articles about Key wrapping and tweakable cipher modes. However, I don't understand the main difference between them? What you recommend for Key storage and Key Archive.
I have an an encryption algorithm I am working with that looks like this: prv_key_enc(sha1_hash(data)) Where, the RSA parameters are: - RSA/ECB/PKCS1Padding - 1024 bit keysize SHA1 will output 20 bytes, is it possible to calculate the maximum number of bytes that could be output by the RSA encryption...
How to calculate the maximum output size for data encrypted with a RSA Private Key?
I want to encrypt data and protect its integrity and confidentiality. However, I cannot increase the length of the data. Are there any cipher modes of operation which provide confidentiality and integrity protection *without* increasing the length of the ciphertext?
I want to encrypt data and protect its integrity and confidentiality. However, I cannot increase the length of the data. Are there any cipher modes of operation which provide confidentiality and integrity protection *without* increasing the length of the ciphertext?
The security behind DH is the computational DH problem, i.e., an eavesdropper learning $g^a$ and $g^b$ cannot compute the shared secret $K=g^{ab}$. But clearly the two parties can as they hold $b$ and $a$ respectively. So for instance the party holding $a$ and received $g^b$ can compute $(g^a)^b$. Both parties holding ...
I have a system that signs plain text messages using a message authentication code (MAC) encrypted with Triple DES. The short message is used on connection to establish a session key, so it would take an attacker a long time to compile a lot of plaintext / MAC examples. I need to establish a key expiration policy t...
By encrypt in place I mean the following. Suppose I have an input plaintext of length L and I have also allocated an extra E bytes at the start and/or end of the buffer, with E << L. So the length of the input buffer is L+E and I'd like to use the same buffer for output (the encrypted data). I understand some fixed ...
Which hardware-accelerated AES-GCM implementations support encryption in-place?
I'm generating a key & iv with OpenSSL via: key = OpenSSL::Cipher::Cipher.new('aes-256-cbc').random_key iv = OpenSSL::Cipher::Cipher.new('aes-256-cbc').random_iv Then I am running the random key through: salt = OpenSSL::Random.random_bytes(32) OpenSSL::PKCS5.pbkdf2_hmac_sha1(key, salt, 2000, ...
Is it overkill to run a key generated by OpenSSL through pbkdf2?
Is MITM attack theoretically possible after public/private key pair exchange is done successfully. Say Alice and Bob have genuine public keys of each other. Is MITM possible further during authentication phase between Alice and Bob? Please find protocol below: Alice and Bob have key pairs.Assume Alice and Bob ha...
Is MITM attack theoretically possible after public/private key pair exchange is done successfully. Say Alice and Bob have genuine public keys of each other. Is MITM possible further during authentication phase between Alice and Bob? Please find protocol below: Alice and Bob have key pairs.Assume Alice and Bob ha...
Considering we have seen unintentional (and intentional?) bugs in crypto recently, I think it would be prudent to chain together different algorithms and sources of entropy, if possible.
> If the KGC gets compromised it will break security, so why should a KGC generate private keys. Certificateless crypto tries to overcome the problem which exists in identity based crypto, i.e., that the KCG generates all the private keys of the users (that is necessary in IBE, see below) and thus knows all the priv...
The strength of symmetric and asymmetric encryption schemes scales with the key length, but there is a difference between symmetric algorithms like AES and asymmetric algorithms like RSA. For example, according to [some sources][1], 128 bit symmetric keys are equivalent to 3072-4096 bit asymmetric keys; but to get 2...
Will non-ECC algorithms like RSA eventually become too inefficient?
Suppose I send a message using AES (private keys already negotiated securely) and I send a hash of this message using RSA (encrypted with private key) with OAEP to verify the authenticity and integrity of the message. I can decrypt the hash with the public key (authentication) and compare the decrypted hash with a h...
Why should a signature use PSS padding in RSA?
I have a question about Pseudo Random Function. Let $f:\{0,1\}^n×\{0,1\}^n → \{0,1\}^n$ be a secure PRF. $F(k,x) = f(k,x) - f(k,x-1)$ is a secuer PRF?
I have a question about Pseudo Random Function. Let $f:\{0,1\}^n×\{0,1\}^n → \{0,1\}^n$ be a secure PRF. $F(k,x) = f(k,x) - f(k,x-1)$ is a **secure** PRF?
I have an an encryption algorithm I am working with that looks like this: prv_key_enc(sha1_hash(data)) Where, the RSA parameters are: - RSA/ECB/PKCS1Padding - 1024 bit keysize I have provided the above parameters because I do not know if those details will affect the size of the output (hence this qu...
In DH if you want to compute $g^a$ from $K$ you have to know $b$ (which the legitimate receiver of $g^a$ clearly knowns, so this does not really make sence). This party can compute the inverse of $b$, namely $b^{-1}$, and then compute $g^a=K^{b^{-1}}$. Note that this is not the same as $(K^b)^{-1}=(g^{ab})^{-1}$. But t...
In DH if you want to compute $g^a$ from $K$ you have to know $b$ (which the legitimate receiver of $g^a$ clearly knowns, so this does not really make sence). This party can compute the inverse of $b$, namely $b^{-1}$, and then compute $g^a=K^{b^{-1}}$. Note that this is not the same as $(K^b)^{-1}=(g^{ab})^{-1}$ (as I ...
In DH if you want to compute $g^a$ from $K$ you have to know $b$ (which the legitimate receiver of $g^a$ clearly knowns, so this does not really make sence). This party can compute the inverse of $b$, namely $b^{-1}$, and then compute $g^a=K^{b^{-1}}$. Note that this is not the same as $(K^b)^{-1}=(g^{ab})^{-1}$ (as I ...
I'm just started to studying elliptic curve cryptosystems. My one month-goal is to write a simple signature system based on the Weil-pairing. Some parts of it can be written without deeper understanding, so I decided to start it with the easier parts right now. I've searched for some ideas on internet, but all I've...
I am beginner to Cryptography. And recently I came across the term "use of SHA-256 in cryptography". What does "Use of SHA-256 in cryptography" mean ? Does it indicates it's use in Diffie Hellman Key exchange ? Or does it indicates it's use in HMAC calculation? I would be very thankful if people can provide th...
What does "Use of SHA-256 in cryptography" mean?
I have an an encryption algorithm I am working with that looks like this: prv_key_enc(sha1_hash(data)) Where, the RSA parameters are: - RSA/ECB/PKCS1Padding - 1024 bit keysize I have provided the RSA parameters as well as information on the data that will be encrypted (sha1 hashed value) because I do...
I am beginner to Cryptography. And recently I came across the requirement like "use of SHA-256 in cryptography". Does "use of SHA-256 in cryptography" imply use of SHA-256 both in HMAC and DH key exchange, assuming these are the only uses of hash in system? I would be very thankful if people can provide their vi...
Does "use of SHA-256 in cryptography" imply use of SHA-256 both in HMAC and DH key exchange, assuming these are the only uses of hash in system?
For a simple proof of concept project i'm (attempting!) to do, i've started looking into openSSL elliptic curve cryptography. However instead of the standard key lengths, 160-512. I'm interested in a resultant key of just 64 bits (less secure I know but that's my projects purpose). Is it possible using elliptic cur...
64 bit Elliptic Curve key?
I am beginner to Cryptography. And recently I came across the requirement like "use of SHA-256 in cryptography". Does "use of SHA-256 in cryptography" imply use of SHA-256 both in HMAC and DH key exchange, assuming these are the only uses of hash in system? I would be very thankful if people can provide their vi...
We do not have the specification of `prv_key_enc`, thus we can not answer with some level of certainty anything more than: the maximum size of its output, in bytes, is **at least 128**. On thing is sure: **the term `prv_key_enc` is grossly non-standard**. Problem is _not_ that [Googling it][1] is circular. The main ...
We do not have the specification of `prv_key_enc`, thus we can not answer with some level of certainty anything more than: the maximum size of its output, in bytes, is **at least 128**. On thing is sure: **the term `prv_key_enc` is grossly non-standard**. Problem is _not_ that [Googling it][1] is circular. The main ...
I have an an encryption algorithm I am working with that looks like this: prv_key_enc(sha1_hash(data)) Where, the RSA parameters are: - RSA/ECB/PKCS1Padding - 1024 bit keysize I have provided the RSA parameters as well as information on the data that will be encrypted (sha1 hashed value) because I do...