instruction
stringlengths
15
30k
I was not able to find an explicit statement about the first and second preimage security of SipHash-2-4 or SipHash-4-8 anywhere. I think it should be 64 bit, but I'd feel safer if somebody who has more experience with such hash functions could confirm this? PS: I am aware that 64 bits can be broken, but I only ...
SipHash - 64 bit (second) preimage security?
In FFX mode the format of the ciphertext is same as plaintext. How it ensures data integrity and authentication? Is there any bit flip attack in FFX mode? is it malleable?
In FFX mode the format of the ciphertext is same as plaintext. How does it ensure data integrity and authentication? Is there any bit flip attack in FFX mode? Is it malleable?
I am running a comparison between Clefia (Lightweight cipher from Sony Corporation which is a standard now http://www.sony.net/Products/cryptography/clefia/standard/index.html) and AES 128 bit. The comparison is done on an android device. (Galaxy S3) For clefia's code, I have converted their official code which i...
I am trying to understand how the physical limits of computation apply to crytography, and came up with the scenario below as a sort of *[gedanken][1]*. I would be grateful to see how others answer it. Assume that Alice 1. used the default GnuPG (aka "GPG") settings, except for the following: * `--s2k-cipher-a...
I am trying to understand how the physical limits of computation apply to crytography, and came up with the scenario below as a sort of *[gedanken][1]*. I would be grateful to see how others answer it. Assume that Alice 1. used the default GnuPG (aka "GPG") settings, except for the following: * `--s2k-cipher-a...
I am trying to understand how the physical limits of computation apply to crytography, and came up with the scenario below as a sort of *[gedanken][1]*. I would be grateful to see how others answer it. Assume that Alice 1. used the default GnuPG (aka "GPG") settings, except for the following: * `--s2k-cipher-a...
I know a PhD student who recently had his paper on applied cryptography rejected because one the reviewers claimed that it was "the solution was too simple and the notation used was more than necessary". It was accepted by the second reviewer. However, both the student's supervisors thought it was a very well-written p...
How does one decrypt the many time pad: random[0] xor random[1] = cipher[0] random[2] xor random[1] = cipher[1] plaintext[0] xor random[1] = cipher[2] assuming that random[n] are perfectly random pads, plaintext is writing and cipher[n] are the encrypted pads. The key random[1] is used three times but it d...
I've been looking into message authentication codes and found several ways to create integrity for a message. I know of the following algorithms: **HMAC**, this can use any cryptograhpic hash function and a key, for a HMAC to be secure the underlying hash function does not have to be (though I assume it would be a g...
How does one decrypt the many time pad: ($R$ is a random string, $C$ is ciphertext, $P$ is plaintext) $R_0 \oplus R_1 = C_0$ $R_2 \oplus R_1 = C_1$ $P_0 \oplus R_1 = C_2$ assuming that $R_n$ are perfectly random pads, plaintext is writing and $C_n$ are the encrypted pads. The key $R_1$ is used three tim...
How does one decrypt the many time pad: ($R$ is a random string, $C$ is ciphertext, $P$ is plaintext) $R_0 \oplus R_1 = C_0$ $R_2 \oplus R_1 = C_1$ $P_0 \oplus R_1 = C_2$ assuming that $R_n$ are perfectly random pads, plaintext is writing and $C_n$ are the encrypted pads. The key $R_1$ is used three tim...
> Should we sign-then-encrypt, or encrypt-then-sign? There's a third option that's not readily apparent. It combines Encrypt-Then-MAC for bulk encryption with public key cryptography. Its also IND-CCA2 as D.W. suggested you strive for. The option is an [Integrated Encryption Scheme](https://en.wikipedia.org/wiki/...
> Should we sign-then-encrypt, or encrypt-then-sign? There's a third option that's not readily apparent. It combines Encrypt-Then-MAC for bulk encryption with public key cryptography. Its also IND-CCA2 as D.W. suggested you strive for. The option is an [Integrated Encryption Scheme](https://en.wikipedia.org/wiki/...
> Should we sign-then-encrypt, or encrypt-then-sign? > ... > Do the same issues with (symmetric-key) MAC-then-encrypt apply to (public-key) sign-then-encrypt? Yes. From a security engineering standpoint, you are consuming ***unauthenticated*** data *if* you mac-then-encrypt or sign-then-encrypt. A very relevant pa...
> Should we sign-then-encrypt, or encrypt-then-sign? > ... > Do the same issues with (symmetric-key) MAC-then-encrypt apply to (public-key) sign-then-encrypt? Yes. From a security engineering standpoint, you are consuming ***unauthenticated*** data during decryption *if* you mac-then-encrypt or sign-then-encrypt. ...
i was tasked with making an expo about **AES** and its steps, but i still cant grasp it, especially when it comes to **"key schedule"**. anyone knows some good material to start learning? or someone can give me good explanations about AES? i tried wikipedia and some random pdfs to no avail
where can i learn the basics of AES?
> Should we sign-then-encrypt, or encrypt-then-sign? > ... > Do the same issues with (symmetric-key) MAC-then-encrypt apply to (public-key) sign-then-encrypt? Yes. From a security engineering standpoint, you are consuming ***unauthenticated*** data during decryption *if* you mac-then-encrypt or sign-then-encrypt. ...
got two question, I am novice in the area of crypto and currently in big learning curve. From crypto book I am going over with, I see the RSA algorithm example as follows: it chose two rand #-s: p=47 q=71 n=pq=3337 and (p-1)(q-1) =3220 Now it chose e - encryption key as randomly for 79 but when it calculate...
> PGP [1024-bit] digital signature vs SHA256 HMAC Comparison... First, you can compare asymmetric and symmetric algorithms. A 1024-bit asymmetric key provides about 80-bits of security. A SHA256 HMAC provides about 128-bits of security. With all other things being equal, the HMAC is stronger. Second, I believe PG...
> PGP [1024-bit] digital signature vs SHA256 HMAC Comparison... First, you can compare asymmetric and symmetric algorithms. A 1024-bit asymmetric key provides about 80-bits of security. A SHA256 HMAC provides about 128-bits of security. With all other things being equal, the HMAC is stronger. Second, I believe PG...
Goldreich and Ostrovsky show that any ORAM algorithm must have bandwidth cost $\Omega(logN)$, where $N$ is the total number of blocks outsourced. This is in Theorem C of [this paper][1]. But they didn't give any proof for this Theorem. Is there other papers that have proved this theorem? [1]: http://cs.ucla.ed...
The answer is "irrelevant", because of a wrong assumption about security. Today, ciphertext only attacks are not considered any more for real security, because it is much too weak. Known plaintext attacks are the very least to be considered, and that breaks any construction of codes or obscure languages. The reason ...
Firstly, bear with me, I'm relatively new to cryptography. In a recent static analysis scan of our application, one of the findings complained that we are using ECB: >A mode of operation of a block cipher is an algorithm that describes how to repeatedly apply a cipher's single-block operation to securely transform a...
Is ECB mode safe to use with RSA encryption?
What does signed fixed window method mean in ECC?
Is there encryption algorithm with the following properties? We always have plaintext in natural language, and the produced ciphertext is also in natural language.
From a few documents I have seen and a few questions about padding here, I think if I passed a encrypted text fewer than BLOCK SIZE, openssl would pad it per PKCS7. And use that paded ecrypted text as IV for next data block. But when I followed the [example][1] (changed method to cfb), I noticed that in decrypt, ctx...
How openssl padding for AES cfb IV?
From a few documents I have read and a few questions about padding here, I think if I passed a encrypted text fewer than BLOCK SIZE, openssl would pad it per PKCS7. And use that padded encrypted text as IV for next data block. But when I followed the [example][1] (changed method to cfb), I noticed that in decrypt, c...
If i have probability $Q = 2C(A\times B)$ where $A$ and $B$ are unknown probabilities and $C$ is a non-negligible probability, what can i speculate about probability $Q$ and how can i calculate bounds on probabilities $A$ and $B$ in order to make this value non-negligible?
Can someone please help me with the question below? > Explain why 0 ⊕ *x* ≠ 1 ⊕ *x*, whatever the value of the bit *x*. > Hence, explain why flipping a bit in the plaintext produces a predictable change in the ciphertext when using a stream cipher that XORs the plaintext with the keystream to produce a cipherte...
What does ⊕ mean in cryptography?
I want to learn more about homomorphic encryption and eventually make a career from it. Currently, I'm thinking to have my bachelor degree in this field. What background should I have for this ? How good at maths should I be? Are there any tests, challenges I can take, programs I can imagine, write, anything I can rea...
How difficult is homomorphic encryption?
I'm currently dealing on the so called Walsh Function (WF) that is written like: $$f^W(a)=\sum_{x\in{F^n_2}}(-1)^{f(x)+(a,x)}$$ What I know is that this function is used to approximate an arbitrary function like $f: F^n_2 \to F_2$ and that the $a$ in the upper function is the so called Walsh Coefficient. But wha...
Whats the Walsh Function about?
I'm currently dealing on the so called “Walsh Function” (WF) that is written like: $$f^W(a)=\sum_{x\in{F^n_2}}(-1)^{f(x)+(a,x)}$$ What I know is that this function is used to approximate an arbitrary function like $f: F^n_2 \to F_2$ and that the $a$ in the upper function is the so called Walsh Coefficient. But w...
What is the “Walsh Function” about?
Suppose we have a value ```$secret``` which is a random 56-bit (7-byte) string. Suppose an adversary wishes to discover ```$secret```. The adversary cannot directly see ```$secret```, but he can see ```substr(sha1_hex("$secret $salt"), 0, 8)``` (where ```$salt``` is public -- and perhaps irrelevant to our calculation...
I came across [1] and I'm very puzzled by this paper. They use a building block which they call "identity-based dynamic threshold (IBDT) signature", citing paper [2]. First of all [2] does use this IBDT term. But even the algorithms list described in [1] does not match the one in [2]. My major concern is this `C...
Does "identity-based dynamic threshold signature" exist and could such scheme contain a "Signature Combination" algorithm?
I came across [1] and I'm very puzzled by this paper. They use a building block which they call "identity-based dynamic threshold (IBDT) signature", citing paper [2]. First of all [2] does use this IBDT term. But even the algorithms list described in [1] do not match the one in [2]. My major concern is this `Com...
Suppose we have a value ```$secret``` which is a random 56-bit (7-byte) string. Suppose an adversary wishes to discover ```$secret```. The adversary cannot directly see ```$secret```, but he can see ```substr(sha1_hex("$secret $salt"), 0, 8)``` (where ```$salt``` is public -- and perhaps irrelevant to our calculation...
Is it possible to develop a scheme where two parties, unsure if they have the same secret, can verify that the other does or does not share the same secret, *without one party being able to cheat and come away with more knowledge than the other*? (Or that if one does, that this can be detected by the other party.) L...
To be *negligible* is not a property of fixed numbers, it is a property of functions of some parameter. It does not make sense to talk about a probability being negligible unless you give a parameter relative to which the probability is negligible. In cryptography we will often consider probability being negligible in ...
While experimenting with this FPE based on FE1 [http://botan.randombit.net/manual/fpe.html][1] (well actually a port of it in C#) I found when the string length gets too long (number of characters N) basically it's designed to throw an exception So the byte array for the modulus is limited to this value ...
What is a good way to handle longer strings using FPE?
Is encryption time always greater than decryption time for all encryption techniques (AES / DES / RSA / DNA), or is there a mistake somewhere in my implementation?
Is encryption time greater than decryption time?
Given an encrypted file, what are possible ways to find its encryption algorithm? Heuristic ways are okay as well.
Given an encrypted file, what are possible ways to find its encryption algorithm?
Colin Percival's `spiped` utility uses a pre-shared key and Diffie-Hellman with ephemeral keys to provide forward secrecy. The protocol is summarized in [the project's README](https://github.com/polvi/spiped) under the section "Encrypted Protocol". What is the purpose of the nonces (`nonce_C` and `nonce_S`)? How a...
Why does spiped use both nonces and ephemeral keys?
I'm looking for an information-theoretic bound on leakage by timing measurement. I'm assuming that an attacker - wants to leak out of a black box a secret key of $k$ bits that is secretly injected into the black box; - has written the black box's code (which can read the key and act accordingly), and can craft this...
I'm looking for an information-theoretic bound on leakage by timing measurement. I'm assuming that an attacker - wants to leak out of a black box a secret key of $k$ bits that is secretly injected into the black box; - has written the black box's code (which can read the key and act accordingly), and can craft this...
I have the first function that generates keys from AES decryption (128-bit key). It takes `seed` as input: derived_key_1 = AES-DEC(key, seed) `seed` and `key` are both fixed values that the attacker cannot changed. Attacker knows the value of `seed`. His goal is to get `derived_key_1`. He dooes have an ex...
I have the first function that generates keys from AES decryption (128-bit key). It takes `seed` as input: derived_key_1 = AES-DEC(key, seed) `seed` and `key` are both fixed values that the attacker cannot changed. Attacker knows the value of `seed`. His first goal is to get `derived_key_1`. He dooes have...
I'm trying to educate my self in key management, how to store them, how to generate them, how to use them properly. I've been trying to find how you would generate a key for symmetric encryption (say AES-128), there is enough to find for public key crypto but that's not what I'm looking for. For what I understand...
I have a system which (should) never shut down, there are keep alive messages every 30 seconds and normal traffic is very variable, might be a few KB/sec might be nothing more than the keep alive message. Normally one would create a new key when you start a new connection but since our connection could (should) be u...
I'm trying to educate my self in key management, how to store them, how to generate them, how to use them properly. I've been trying to find how you would generate a key for symmetric encryption (say AES-128), there is enough to find for public key crypto but that's not what I'm looking for. For what I understand...
I have a system which (should) never shut down, there are keep alive messages every 30 seconds and normal traffic is very variable, might be a few KB/sec might be nothing more than the keep alive message. Normally one would create a new key when you start a new connection but since our connection could (should) be u...
I'm looking for a *standard*, or sound *industry practice*, for the equivalent of a Key Check Value, applied to the private key of a public key algorithm, like ECDSA. For DES or 3DES keys, practice (as worded e.g. in [EMV Card Personalization Specification][1]) is: > 6.1.5 **Key Check Value**<br> > _Purpose_: The ...
Key Check Value standard pratice for asymetric cryptography?
Why is diffie-hellman defined on a cyclic group[0]? Doesn't it work for any commutative operation which the inverse is hard to find? Say alice and bob agree in a public prime $c$ and both choose a secret prime $a$ respectively $b$ Alice sends $ac$ to Bob and Bob $bc$ to Alice. Alice then multiplies $a$ with bo...
Why does Diffie-Helmman need be a cyclic group?
to sign a transaction (message) in Bitcoin system, you need to encode the message to a point of the curve y^2=x^3+7. I read this [Koblitz's paper][1]. There are three encoding schemes. I read [this question][2] too. My question: If I look at the [code of Bitcoin Core][3] I can't see any of these encoding schemes...
To sign a transaction (message) in Bitcoin system, you need to encode the message to a point of the curve y^2=x^3+7. I read this [Koblitz's paper][1]. There are three encoding schemes. I read [this question][2] too. My question: If I look at the [code of Bitcoin Core][3] I can't see any of these encoding schemes...
Consider we have three parties,namely client $A$, client $B$ and a server. Client $B$ and the server can be malicious, but we do not allow the adversary to simultaneously corrupt the server and client $B$ (similar to [1]). The scenario is that both clients outsource their private data to the server. Then they ask th...
To sign a transaction (message) in Bitcoin system, you need to encode the message to a point of the curve y^2=x^3+7. I read this [Koblitz's paper][1]. There are three encoding schemes. I read [this question][2] too. My question: If I look at the [source code of Bitcoin Core][3] I can't see any of these encoding ...
Consider we have three parties,namely client $A$, client $B$ and a server. Client $B$ and the server can be malicious, but we do not allow the adversary to simultaneously corrupt the server and client $B$ (similar to [1]). The scenario is that both clients outsource their private data to the server. Then they ask th...
$A$ has outsourced it's private data to the server, right? In that case $A$'s private data has already been leaked to the adversary when the server was corrupted. So there is no added leakage in $B$ also learning this data. In fact since only one of $B$ and the server can be corrupted (assuming static corruptions) we c...
Consider we have three parties,namely client $A$, client $B$ and a server. Client $B$ and the server can be malicious, but we do not allow the adversary to simultaneously corrupt the server and client $B$ (similar to [1]). The scenario is that both clients outsource their private data to the server. Then they ask th...
I'm looking for an information-theoretic bound on leakage by timing measurement. I'm assuming that an attacker - wants to leak out of a black box a secret key of $k$ bits that is secretly injected into the black box; - has written the black box's code (which can read the key and act accordingly), and can craft this...
> Why is diffie-hellman defined on a cyclic group[0]? Doesn't it work for any commutative operation which the inverse is hard to find? No, you need associativity as well; once you have that, your idea would work fine, once we find a semigroup (that's what we can sets with an operator that is associative) with the ap...
Is there any known and proven algorithm which allows n-of-m keys en/decryption, but doesn't require the keys to be in one location? That is, it allows the secret to be encrypted with one part of the secret, then passed on to another party, until n parties processed it. Practically I'm looking for a solution to secre...
> Why is diffie-hellman defined on a cyclic group[0]? Doesn't it work for any commutative operation which the inverse is hard to find? No, you need associativity as well; once you have that, your idea would work fine, once we find a semigroup (that's what we can sets with an operator that is associative) with the ap...
> Why is diffie-hellman defined on a cyclic group[0]? Doesn't it work for any commutative operation which the inverse is hard to find? No, you need associativity as well; once you have that, your idea would work fine, once we find a semigroup (that's what we call sets with an operator that is associative) with the a...
Is there any known and proven algorithm which allows n-of-m keys en/decryption, but doesn't require the keys to be in one location? That is, it allows the plaintext (or ciphertext) to be encrypted (or decrypted) with one part of the secret, then passed on to another party, until n parties processed it. Practically I...
Why is Diffie-Hellman [defined on a cyclic group][0]? Doesn't it work for any commutative operation which the inverse is hard to find? Say Alice and Bob agree in a public prime $c$ and both choose a secret prime $a$ respectively $b$ Alice sends $ac$ to Bob and Bob $bc$ to Alice. Alice then multiplies $a$ with ...
Why does Diffie-Hellman need be a cyclic group?
The way I see it, you have a few options. The right one will depend on the details of the application, which are sparse in the question. 1. Use a stream cipher (or stream-like mode). Each party has a separate key and encrypts/decrypts with their individual key. With this you only get n-out-of-n, not m-out-of-n where...
Is there any known and proven algorithm which allows n-of-m keys en/decryption, but doesn't require the keys to be in one location? That is, it allows the plaintext (or ciphertext) to be encrypted (or decrypted) with one part of the secret, then passed on to another party, until n parties processed it. Practically I...
Where should I look at in [Bitcoin Core source code][3] to figure out how the signature process trasform a message in a curve point? To sign a transaction (message) in Bitcoin system, you need to encode the message to a point of the curve $y^2=x^3+7$. I read this [Koblitz's paper][1]. There are three encoding scheme...
Is there any known and proven algorithm which allows n-of-m keys en/decryption, but doesn't require the keys to be in one location? That is, it allows the plaintext (or ciphertext) to be encrypted (or decrypted) with one part of the secret, then passed on to another party, until n parties processed it. Practically I...
I have a private key {d,n}, public key {e,n}, where n is the modulus and i have also the prime numbers such that p1 * p2 = n. I want create a PEM file having this informations, in the way that i can decrypt a file encrypted with the public key, using openssl. Someone knows how can i do?
Using LUC RSA, I have a list of 8 public keys (R[1],n[1]) through (R[8],n[8]), and a list of 8 messages M[1]-M[8]. The messages have all been double encrypted. However, one of the public key exponents, n[5], is not given. The problem is to decrypt all of the messages, and so I must also determine the value of the miss...
Using LUC RSA, I have a list of 8 public keys (R[1],n[1]) through (R[8],n[8]), and a list of 8 messages M[1]-M[8]. The messages have all been double encrypted. However, one of the public key exponents, n[5], is not given. The problem is to decrypt all of the messages, and so I must also determine the value of the miss...
Using [LUC RSA][1], I have a list of 8 public keys $(R_1,n_1)$ through $(R_8,n_8)$, and a list of $8$ messages $M_1\dots M_8$. The messages have all been double encrypted. However, one of the public key exponents, $n_5$, is not given. The problem is to decrypt all of the messages, and so I must also determine the valu...
Given $k\phi(p)$, is it hard to recover $p$? Here, $p$ is a large prime, $\phi(\cdot)$ is Euler's totient function and $k$ is an unknown integer. Or what's the complexity to recover $p$ from $k \phi(p)$.
Is it hard to recover $p$ from $k \phi(p)$?
Is this $e(g^x,g^yH^z) = e(g^x,g^y)e(g^x,H^z)$ expression is true? where $ g$ is the generator and $ H \in G $
If $p$ is prime, then $\phi(p) = p-1$; so the question is "given $k(p-1)$, can someone get a good guess of what $p$ might be?" It is unlikely that the attacker would be able to limit it to one particular value of $p$ (as there are likely to be multiple values of $p$ that are plausible), however the attacker might be a...
I'm reading about the broadcast encryption described in Fiat and Naor's paper: ![the 1-resilient scheme][1] The full paper can be found [here][2] How is it that two users (not in the privileged set T) could collude to compute g, while one user can't? [1]: https://i.stack.imgur.com/1CNW0.png [2]: http...
Why is this broadcast encryption scheme 1-resilient?
I'm reading about the broadcast encryption described in Fiat and Naor's paper, I screen grabbed the relevant part below. My question is essentially: If there's a secret: g^abc mod A (where A=PQ sufficiently large primes) why is it that one user who knows: g^d mod A, a, b, c, and A could not calculate ...
I'm reading about the broadcast encryption described in Fiat and Naor's paper, I screen grabbed the relevant part below. My question is essentially: If there's a secret: $g^{abc}$ $mod$ $A$ (where $A=PQ$ (both sufficiently large primes)) why is it that one user who knows: $g^d$ $mod$ $A$, $a$, $b$, $c$, ...
Question about discrete log - why can one attacker not solve for g but two colluders can?