instruction stringlengths 15 30k |
|---|
I'm quite new to cryptographic systems, and today we discussed entropy at work. Since entropy is used to ensure the difficulty for an attacker to break in, I was wondering if the more time the high entropy value remains the same, the more the system becomes vulnerable.
Is the concept of entropy related with the time... |
Is entropy affected by time? |
As you may know, the Gödel Prize 2013 will be awarded this year to cryptographers (see this [ACM press release](http://www.acm.org/press-room/news-releases/2013/goedel-prize-13/)). The people awarded are Antoine Joux, the team of Dan Boneh and Matthew K. Franklin.
Can somebody explain their contribution to cryptogra... |
I choose at random a square matrix A of size 128 in GF(2). I want to use this matrix as a substitution box. Is this a non linear transformation ?
I've seen that substitution boxes are the non linear parts of a block cipher algorithm, but the product between A and x is linear ? Not ? There is something that I don't ... |
We call an operation F linear if the following holds:
$F(X+Y) = F(X) + F(Y)$
for all $X, Y$ within the appropriate set, and for some group operator $+$.
Now, if we consider matrix multiplication by a fixed matrix $A$, we do have the identity:
$A \cdot (X+Y) = A \cdot X + A \cdot Y$
for arbitrary vect... |
I choose at random an invertible square matrix A of size 128 in GF(2). I want to use this matrix as a substitution box. Is this a non linear transformation ?
I've seen that substitution boxes are the non linear parts of a block cipher algorithm, but the product between A and x is linear ? Not ? There is something t... |
Given many pairs of $(m, t)$, can the attacker compute the key $k$ satisfying $\text{HMAC}(k,m) = t$? (Assume that $k$ was chosen at random.) |
With HMAC, can an attacker recover the key, given some known plaintext? |
With HMAC, can an attacker recover the key, given many known plaintext/tag pairs? |
I've been reading about the S/KEY One-Time Password system on wikipedia [here](http://en.wikipedia.org/wiki/S/Key) and was wondering why the server only stores a single password and not the list of one-time passwords like the client does. In other words, why is the implementation __not__ a simply a password-to-passwor... |
Why does the server in S/KEY authentication only store a single password? |
<p>
Crypto Stack Exchange is for software developers, mathematicians and others interested in cryptography.
</p>
<p>Cryptography Stack Exchange is for asking questions about the mathematics and properties of cryptographic systems, their analysis ("cryptanalysis") and subsidiary topics that generally make up cr... |
I can calculate Q=abG several ways<br>
Q = a*(bG) or<br>
Q = b*(aG) Gives same result as expected<br>
But if I do<br>
c = (a*b) % n where (a*b) is much greater than n<br>
Q = cG<br>
I get a different point.</p>
<p>Should I have expected this? Or does this diffe... |
There seems to be three different notions mixed up here. Suppose your system has a secret key, and that your question should be understood as asking how the quality of that key changes over time, and how that relates to the concept of Entropy. In such case:
1. How much entropy does a key have to have, for your syst... |
I wonder in which cases we can use deprecated encryption schemes. In fact I think about 64-bit block ciphers like DES or Blowfish.
Can this kind of block cipher be very secure for certain specific types of plaintext (for instance those having a lot of entropy) ?
Thank you in advance. |
There seems to be three different notions mixed up here. Suppose your system has a secret key, and that your question should be understood as asking how the quality of that key changes over time, and how that relates to the concept of Entropy. In such case:
1. How much entropy does a key have to have, for your syst... |
I read that the **Encrypt-then-MAC** paradigm is provably secure.
From what I understand, when using for example AES for encryption and HMAC_SHA256 for MAC generation (and the keys $K_1 \neq K_2$), this means the following:
1. $ciphertext = AES_{K_1}\{plaintext\}$
2. $mac = HMAC\_SHA256_{K_2}\{ciphertext\}$
... |
According to Wikipedia, a cryptographic hash function has the following properties:
1. Pre-image resistance: Given h, it's difficult to find any message m such that h = H(m).
2. Second pre-image resistance Given m_1, it's difficult to find another m_2 such that m_1 != m_2 and H(m_1) = H(m_2)
3. Collision Resista... |
I can calculate $Q = a\,b\,G$ in several ways:
$Q = a \, (b \, G)$ or $Q = b \, (a \, G)$. These give the same result, as expected.
But if I do $c = (a \, b) \bmod n$ where $a \, b$ is much greater than $n$, then $Q = c \, G$, I get a different point.
Should I have expected this? Or does this difference indicate... |
According to Wikipedia, a cryptographic hash function has the following properties:
1. Pre-image resistance: Given $h$, it's difficult to find any message $m$ such that $h = H(m)$.
2. Second pre-image resistance: Given $m_1$, it's difficult to find another $m_2$ such that $m_1 \ne m_2$ and $H(m_1) = H(m_2)$
3. C... |
In what cases can we use block ciphers with 64-bit block size (e.g., DES or Blowfish)?
Can this kind of block cipher be very secure for certain specific types of plaintext (for instance those having a lot of entropy)? |
Another way of stating what you're asking is "if I encrypt a random number, how will an attacker know if he's correctly decrypted it?" The answer is "because the attacker may someday learn some of your output."
Consider what would happen if you used the algorithm to encrypt a thousand random numbers, but then you e... |
I was reading about block ciphers and most articles state they are being used in symmetric key cryptography. Are they also being used in public key cryptography? if not, what alternative pkc use?
Thanks,
|
Are block ciphers used in public key crypto? |
I am on the impression that [SRP][1] emerges as the least uncommon and best analyzed protocol for authentication and key agreement based on a short password.
[This][2] states that SRP is part of IEC 11770-4, among other protocols. But no version is specified, and I've seen there's [SRP-1][3], [SRP-2][4], [SRP-3][5],... |
Which version(s) of SRP are in ISO/IEC 11770-4:2006? |
Inspired by [Henrick Hellström's comment](http://crypto.stackexchange.com/questions/8564/hmac-and-assumptions-on-the-cryptographic-hash#comment15676_8564), I think you need to dig a bit deeper into what “difficult” means.
Pre-image resistance means that given $h$, it's difficult to find $m$ such that $h = H(m)$. Int... |
Inspired by [Henrick Hellström's comment](http://crypto.stackexchange.com/questions/8564/hmac-and-assumptions-on-the-cryptographic-hash#comment15676_8564), I think you need to dig a bit deeper into what “difficult” means.
Pre-image resistance means that given $h$, it's difficult to find $m$ such that $h = H(m)$. Int... |
We _can_ still safely use 64-bit-block ciphers when used in an otherwise sound protocol, and all of the following three conditions are met:
- The effective key size is made big enough; that disqualifies DES (55-bit), but not Blowfish (up to 448 bits), 3DES (167 bits), and to some degree 2-keys-3DES (111 bits). Note:... |
We _can_ still safely use 64-bit-block ciphers when used in an otherwise sound protocol, and all of the following three conditions are met:
- The effective key size is made big enough; that disqualifies DES (55-bit), but not Blowfish (up to 448 bits), 3DES (167 bits), and to some degree 2-keys-3DES (111 bits). Note:... |
According to Wikipedia, a [cryptographic hash function](http://en.wikipedia.org/wiki/Cryptographic_hash_function) has the following properties:
1. Pre-image resistance: Given $h$, it's difficult to find any message $m$ such that $h = H(m)$.
2. Second pre-image resistance: Given $m_1$, it's difficult to find anoth... |
Am I missing something or is RSA very very limiting when it comes to ecrypting data when it comes to the actual message size.
I have read that you can only encrypt a message of around 117 to 200 bytes in size (depending on your key size i.e. 1024 or 2048 bit).
Is this correct?
If so, I think I have read people... |
If RSA is limited to 117-200 bytes or so, is has a very limited use case? |
We _can_ still safely use 64-bit-block ciphers when used in an otherwise sound protocol, and all of the following three conditions are met:
- The effective key size is made big enough; that disqualifies DES (55-bit), but not Blowfish (up to 448 bits), 3DES (167 bits), and to some degree 2-keys-3DES (111 bits). Note:... |
Before we jump into this question, you first need to know a bit about the internals of hash functions with the Merkle-Dåmgard construction. Here's a pretty picture from Wikipedia:
![merkle damgard construction][1]
In this diagram, you see the compression function $f$ being fed the message blocks along with the ou... |
We _can_ still safely use 64-bit-block ciphers when used in an otherwise sound protocol, and all of the following three conditions are met:
- The effective key size is made big enough; that disqualifies DES (55-bit), but not Blowfish (up to 448 bits), 3DES (167 bits), and to some degree 2-keys-3DES (111 bits). Note:... |
**Does it negatively affect security to calculate a hash value of the ciphertext before MAC calculation? Like exchanging step 2. with this: HMAC-SHA256(SHA256(ciphertext)).**
Technically, yes, but not significantly. In order to attack the scheme you propose, the attacker would have to be able to do at least one of t... |
**Does it negatively affect security to calculate a hash value of the ciphertext before MAC calculation? Like exchanging step 2. with this: HMAC-SHA256(SHA256(ciphertext)).**
Technically, yes, but not significantly. In order to attack the scheme you propose, the attacker would have to be able to do at least one of t... |
According to http://en.wikipedia.org/wiki/RSA_%28algorithm%29#Key_generation the key length is the number of bits in n. So how can a message of many megabytes (millions of bits) be modded by a 1024 bit n? I never hear of a block mode for RSA, for instance. |
How is text converted to a number for RSA? |
How about embedding each block's MAC to the next? So that $b_0=b_0+MAC(b_1)$, with the last block having the MAC of the first? To make it even easier to identify a corrupt block, $$b_n=b_n+MAC(b_{n-1})+MAC(b_{n+1})$$
where $+$ denotes concatenation. To identify the order of the blocks, simply try to fit them togethe... |
How about embedding each block's MAC to the next? So that $b'_0=b_0||MAC(b_1)$, with the last block having the MAC of $b_0$. To make it even easier to identify a corrupt block, $$b'_n=b_n||MAC(b_{n-1})||MAC(b_{n+1})$$
where $||$ denotes concatenation. To identify the order of the blocks, simply try to fit them toget... |
I am on the impression that [SRP][1] emerges as the least uncommon and best analyzed protocol for authentication and key agreement based on a short password.
[This][2] states that SRP is part of IEC 11770-4, among other protocols. But no version is specified, and I've seen there's [SRP-1][3], [SRP-2][4], [SRP-3][5],... |
I am on the impression that [SRP][1] emerges as the least uncommon and best analyzed protocol for authentication and key agreement based on a short password.
[This][2] states that SRP is part of IEC 11770-4, among other protocols. But no version is specified, and I've seen there's [SRP-1][3], [SRP-2][4], [SRP-3][5],... |
We _can_ still safely use 64-bit-block ciphers when used in an otherwise sound protocol, and all of the following three conditions are met:
- The effective key size is made big enough; that disqualifies DES (55-bit), but not Blowfish (up to 448 bits), 3DES (167 bits), and to some degree 2-keys-3DES (111 bits). Note:... |
D-Wave has commercially available 512-qbit quantum computers now. A lot of [big names](http://www.theglobeandmail.com/report-on-business/small-business/sb-tools/small-business-briefing/quantum-computing-firm-d-wave-lands-30-million/article4591920/) are taking it seriously. Google, NASA, and USRA have joined forces to... |
Will D-Wave's quantum computers ruin classical encryption? |
I am wondering about the computational cost of [ECDSA][1] signature verification, in term of multiplications in the base field; and, as an aside, in term of (much cheaper) additions. To make things concrete, assume ECDSA in a field $GF(p)$ per [FIPS 186-3][2] (which refers to [ANSI X9.62:2005][3]<sup><sub> (webstore)</... |
In ECDSA, how many field operations are used for signature verification? |
We _can_ still safely use 64-bit-block ciphers when used in an otherwise sound protocol, and all of the following three conditions are met:
- The effective key size is made big enough; that disqualifies DES (55-bit), but not Blowfish (up to 448 bits), [TEA][1] (128 bits), [3DES][2] (167 bits), and to some degree 2-k... |
I am wondering about the computational cost of [ECDSA][1] signature verification, in term of multiplications in the base field; and, as an aside, in term of (much cheaper) additions. To make things concrete, assume ECDSA in a field $GF(p)$ per [FIPS 186-3][2] (which refers to [ANSI X9.62:2005][3]<sup><sub> (webstore)</... |
I am wondering about the computational cost of [ECDSA][1] signature verification, in term of multiplications in the base field; and, as an aside, in term of (much cheaper) additions. To make things concrete, assume ECDSA in a field $GF(p)$ per [FIPS 186-3][2] (which refers to [ANSI X9.62:2005][3]<sup><sub> (webstore)</... |
I have a 130-160 characters message that I need to split in say, 3 parts, and be able to reconstruct it by recovering all 3 parts. I also need that these parts are type-able, meaning that they can't be too long, and they can't contain weird characters.
I tried with [Shamir](https://en.wikipedia.org/wiki/Shamir%27s_S... |
How can I split a message in parts of similar size or smaller? |
I have a 130-160 characters message that I need to split in say, 3 parts, and be able to reconstruct it by recovering all 3 parts. I also need that these parts are type-able, meaning that they can't be too long (I mean not much longer than the original message), and they can't contain weird characters.
I tried with ... |
In what cases can we use a weak block cipher like DES ?
More precisely, Are there specific situation in which a weaken block cipher can still be used, for instance for certain types of plaintext ? |
I am wondering about the computational cost of [ECDSA][1] signature verification, in term of multiplications in the base field; and, as an aside, in term of (much cheaper) additions. To make things concrete, assume ECDSA in a field $GF(p)$ per [FIPS 186-3][2] (which refers to [ANSI X9.62:2005][3]<sup><sub> (webstore)</... |
Am I missing something, or is RSA very very limiting when it comes to ecrypting data when it comes to the actual message size?
I have read that you can only encrypt a message of around 117 to 200 bytes in size (depending on your key size: 1024 or 2048 bits). Is this correct?
If so, I think I have read people sugg... |
If RSA is limited to 117-200 bytes or so, is that a very limited use case? |
A DSA signature consists of two scalars $(r,s)$.
When signing $s$ is generated as:
* $s=k^{-1}(H(m)+xr) \mod q$
* The signature is $(r,s)$
When verifying $s$ is only used to compute $w = s^{-1}$. So why does DSA store $s$ in the signature instead of $w$?
Using $w$ has no performance effect on signing since... |
Why use $(r,s)$ instead of $(r,s^{-1})$ as DSA signature? |
My question is (hopefully, for somebody) a simple one; but my project is holding as I'm not sure.
I read on SO that generating encryption keys without an IV is a bad idea, so is using a constant IV as the first part of any cipher block will be the same across multiple encryptions.
If you're encrypting a single ... |
I'm thinking about trying to save some space (and readability) when referencing 2k and 4k public keys (millions of them) by storing the [fingerprint](http://en.wikipedia.org/wiki/Public_key_fingerprint) in some places instead of the full public key.
> The primary threat to the security of a fingerprint is a preimage... |
When making public key fingerprints - is a sha1 hash still a good idea? |
After doing lots of reading on SO and other websites relating to AES cryptography, I am trying to understand the security issues surrounding IV's.
There seems to be a lot of confusion and contradiction surrounding this subject.
Many say it is safe to publish the IV as it is not a secret whilst others say it shou... |
Is triple des similiar to rsa in that the message size you can encrypt is limited (unlike AES)?
Yes you can break the message size into parts and apply it, but I'm not interested in doing that so I want to know if triple des has this same "limitation" like RSA?
I know AES is better suited for my situation where... |
Is triple des similiar to RSA in that they message size is limited to the key size? |
>Is triple des similiar to rsa in that the message size you can encrypt is limited (unlike AES)?
If you mean they both are block ciphers, then yes. |
I took a look at [this][1] question. My question is not the same.
I've unique keys encrypting (in CBC mode, AES-256) each plaintext, i.e. I do not use a key to encrypt more than one plaintext. Is it insecure to use null IVs in this case? Why?
[1]: http://crypto.stackexchange.com/questions/5185/why-or-when-to-... |
Why should I use an Initialization Vector (IV) when I have unique keys? |
When each key is used only to encipher a single message, it is safe (from a confidentiality standpoint) to use null IV for all messages. That's common. It avoids the need to generate an IV, and transmit it, and perform a XOR of the first block with it. That's true for all [common modes][1] requiring an IV, including CB... |
**There's no need for an IV when unique keys are used.**
When each key is used only to encipher a single message, it is safe (from a confidentiality standpoint) to use null IV for all messages. That's common. It avoids the need to generate an IV, and transmit it, and perform a XOR of the first block with it. That's ... |
**There's no need for an IV when unique keys are used.**
When each key is used only to encipher a single message, it is safe (from a confidentiality standpoint) to use null IV for all messages. That's customary, for all [common modes][1] requiring an IV. It avoids the need to generate an IV, and transmit it, and (in... |
As already mentioned by fgrieu in a [comment](http://crypto.stackexchange.com/questions/8589/no-iv-for-one-off-symmetric-file-encryption#comment15765_8590), you seem to be mixing up the [initialization vector](http://en.wikipedia.org/wiki/Initialization_vector) for the cipher with the salt for the [key derivation](http... |
[Göloğlu, Granger, McGuire, and Zumbrägel][1] broke the [DLP][2] in the Galois [finite field][3] with $2^n$ elements for $n=6120$, and [Antoine Joux][4] did it for $n=6168$, with modest computing power. These recent announcements directly imply that cryptosystems (if any) based on the DLP in a field with $2^n$ elements... |
There is some intriguing things about DES and 3DES. Now, I know that DES is weak and 3DES was an attempt to construct a more secure block-cipher from a deprecated one.
Having this in mind, what about the composition of two independent instantiations of block-cipher (t.i.t.s with two independent keys) having a reduc... |
There is some intriguing things about DES and 3DES. Now, I know that DES is weak and 3DES was an attempt to construct a more secure block-cipher from a deprecated one.
Having this in mind, what about the composition of two independent instantiations of block-cipher (t.i.t.s with two independent keys) having a reduc... |
D-Wave has commercially available 512-qbit quantum computers now. A lot of [big names](http://www.theglobeandmail.com/report-on-business/small-business/sb-tools/small-business-briefing/quantum-computing-firm-d-wave-lands-30-million/article4591920/) are taking it seriously. Google, NASA, and USRA have joined forces to... |
A block cipher is a bijective map from the set of possible plaintexts to the set of ciphertexts, which are the same size and might as well be considered the same thing: $\theta: S\to S$. In this there must exist a fixed point m $\in S$ such that $\theta(m) = m$ (alternatively you could consider encryption to be a binar... |
A block cipher is a bijective map from the set of possible plaintexts to the set of ciphertexts, which are the same size and might as well be considered the same thing: $\theta: S\to S$. In this there must exist a fixed point m $\in S$ such that $\theta(m) = m$ (alternatively you could consider encryption to be a binar... |
Your first two paragraphs made a series of statements; these statements were less than perfectly accurate, and D.W. attempted to address those.
You then went on and asked
> What I don't understand is how a key that is longer than a block size provides
any extra security. From what I understand this would sugge... |
Given a [Cryptographic hash function][1] $h$ for element $x$, let's extend it to sets via $H(S)=\prod_{x\in{S}}{h(x)}$. I am asking if the new hash $H$ (in domain of set) is still collision resistant?
To be more specific, is it the same difficult to compute $S$ for given $H(S)$, comparing to that of computing $x$ f... |
Does collision resistance stay when extending a hash function to a set domain? |
I'll assume that in $H(S)=\prod_{x\in{S}}{h(x)}$, the notation $\prod$ stands for the product of the integers represented by the bitstrings $h(x)$.
There are three different questions:
1. in the title: is $H$ collision resistant? That is: is it possible to exhibit ditinct $S$ and $S'$ such that $H(S′)=H(S)$?
2. ... |
I'll assume that in $H(S)=\prod_{x\in{S}}{h(x)}$, the notation $\prod$ stands for the product of the integers represented by the bitstrings $h(x)$. If $\prod$ stands for a product in something else, tell us what!
There are three different questions:
1. in the title: is $H$ collision resistant? That is: is it poss... |
I'll assume that in $H(S)=\prod_{x\in{S}}{h(x)}$, the notation $\prod$ stands for the product of the integers represented by the bitstrings $h(x)$. If $\prod$ stands for a product in something else, tell us what!
There are three different questions:
1. in the title: is $H$ collision resistant? That is: is it poss... |
I'll assume that in $H(S)=\prod_{x\in{S}}{h(x)}$, the notation $\prod$ stands for the product of the integers represented by the bitstrings $h(x)$. If $\prod$ stands for a product in something else, tell us what!
There are three different questions:
1. in the title: is $H$ collision resistant? That is: is it poss... |
I have been reading about differential and linear cryptanalysis. They were mainly introduced by Adi Shamir and Biham to show weakness of DES. However, many of articles state that they have been considered as a technique to evaluate all other block ciphers. My question is, are they beneficial for public key cryptography... |
Suppose one has a (strong) shared secret key and wishes to authenticate a
<br>
very long string in a way that will allow the verifier to verify small small substrings
<br>
without reading much of the stored data and without much storage overhead.
<br>
The trivial way to do this is to divide the string into chunks... |
Can substrings of a long string be efficiently authenticated? |
I'll assume that in $H(S)=\prod_{x\in{S}}{h(x)}$, the notation $\prod$ stands for the product of the integers represented by the bitstrings $h(x)$. If $\prod$ stands for a product on some [(semi)group][1] other than $\mathbb N$, tell us which!
There really are three different questions:
1. In the title: **Is $H$ ... |
In RSA, some security authorities and/or standards allow the public exponent $e=3$, others require or recommend $e>2^{16}$ (or perhaps some other minimum). I gathered the following:
- [PKCS#1][1] allows $e=3$ for both RSA digital signature and encryption (but see 3. below).
- [ISO/IEC 9796-2][2] allows $e=3$ (in th... |
Suppose one has a (strong) shared secret key and wishes to authenticate a
<br>
very long string in a way that will allow the verifier to verify small substrings
<br>
without reading much of the stored data and without much storage overhead.
<br>
The trivial way to do this is to have a nonce, divide the string in... |
I'm currently learning private-key cryptography. I've been able to see that perfect secrecy is achievable if no assumption is made about the computational power of the attacker.
However, perfect secrecy is quite heavy to use, so we relax our assumptions to achieve the so-called computational secrecy, by assuming tha... |
What does "running in polynomial time" really mean? |
I'm currently learning private-key cryptography. I've been able to see that perfect secrecy is achievable if no assumption is made about the computational power of the attacker.
However, perfect secrecy is quite heavy to use, so we relax our assumptions to achieve the so-called computational secrecy, by assuming tha... |
In RSA, some security authorities and/or standards allow the public exponent $e=3$, others require or recommend $e>2^{16}$ (or perhaps some other minimum). I gathered the following:
- [PKCS#1][1] allows $e=3$ for both RSA digital signature and encryption (but see 3. below).
- [ISO/IEC 9796-2][2] allows $e=3$ (in th... |
I have a message M1 and I want to encrypt it by XORing it with two keys K1 and K2, giving as result K3. So far so good.
Now I was wondering if I could create a "fake" result K4, by XORing a different message M2 with the same keys K1 and K2, giving as result K4. This way, if I'm forced to handle K3, I can give K4 ins... |
Is this OTP scheme safe? |
I have a message M1 and I want to encrypt it by XORing it with two keys K1 and K2, giving as result K3. So far so good.
Now I was wondering if I could create a "fake" result K4, by XORing a different message M2 with the same keys K1 and K2, giving as result K4. This way, if I'm forced to handle K3, I can give K4 ins... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.