instruction stringlengths 15 30k |
|---|
> RSA primes are 100 bit. You know first 80 bits of one of the primes. In this system, come up with an efficient way to decrypt the cipher-text.
This was the question on my quiz. I'm not sure how to go about it. Any hints? |
For our privacy-preserving protocol, an encrypted channel is established. In order to protect our system from man-in-the-middle attacks, signature-based approach is used. After we've implemented it with RSA, we decided to optimize the protocol a bit by using ECDSA. The result was very surprising: on Android, signing an... |
I'm a pentester and currently analysing a web application which are using some strange encryption scheme.
The point is: They encrypt using AES-128, generate a (not cryptographic secure) key and use this as encryption key AND initialization vector.
I'm not a crypto expert, but I know that this is bad (aside of the... |
While educating my self I'm having hard time to understand what an 128 bit AES key actually means?
Is it a key length or entropy?
Please explain to me trough following example (assuming AES):
> Password length in characters (L) = 20 (characters)
>
> Symbols used (N) = 95 (ASCII set)
>
> Entropy = log2 (N^... |
Is AES key length a size of the key or entropy? |
I could not find any mention on the Internet of a proven/known cryptographically secure keyed rolling hash function (ie rolling MAC). Has the question been studied, is it possible to build one ?
By cryptographically secure I mean properties equivalent to HMAC with a cryptographic hash function :
- without knowin... |
Hashcash is a proof-of-work system in which the Sender needs to find Y such as the first (let's say 20) bits of H(X+Y) are zeros where H is a one-way hash function, X is a fixed value and "+" means concatenation. The Sender starts with an initial random number Y. It then computes the hash of X+Y. If the first 20 bits o... |
Is there a number of tries after which Hashcash is guaranted to be solved? |
I could not find any mention on the Internet of a proven/known cryptographically secure keyed rolling hash function (ie rolling MAC). Has the question been studied, is it possible to build one ?
By cryptographically secure I mean properties equivalent to HMAC with a cryptographic hash function :
- without knowin... |
I know that the public exponent is always a prime, but what about the private exponent ? Is it always a prime too ?
Thanks in advance. |
Given, say, the Blowfish block cipher, which is considered secure but only has a 64-bit block size, can we construct a secure block cipher of 128-bit block size?
Say we run the key through two KDFs, and encrypt the first half of the block with the first key, and the second half of the block with the second key. This... |
Is it possible to construct a secure block cipher of size $2n$ given a secure block cipher of size $n$? |
Am not a mathematician.
Every crypto specification I see uses the modulo operation. For example RSA -
if e is the public key and m is the plaintext with a modulus n - the cipher text c = m^{e} mod(n)
Why is this mod n there? By definition isn't the modulo operation introduces an uncertainty? I mean 3mod7 ==... |
Why do all crypto algorithm specifications have a modulo operation at every step? |
**Is it the idea to limit the result to a group?**
Yes. The advantage to doing so is that we have multiplicative inverses (well, for anything relatively prime to $n$) and can therefore decrypt. It also keeps ciphertexts relatively small.
**Why is there no uncertainty about the result?**
There would be, except ... |
Am not a mathematician.
Every crypto specification I see uses the modulo operation. For example RSA -
If $e$ is the public key and $m$ is the plaintext with a modulus $n$ - the cipher text is $c = m^{e} \bmod n$
Why is this $\bmod\ n$ there? By definition isn't the modulo operation introduces an uncertainty?... |
**Is it the idea to limit the result to a group?**
Yes. The advantage to doing so is that we have multiplicative inverses (well, for anything relatively prime to $n$) and can therefore decrypt. It also keeps ciphertexts relatively small.
**Why is there no uncertainty about the result?**
There would be, except ... |
Wikipedia claims that the best attack on the surprisingly simple [TEA](https://en.wikipedia.org/wiki/Block_TEA) block cipher, that isn't a related-key attack, has a time complexity of $2^{121.5}$.
So despite how unsophisticated the cipher looks, if I use a KDF properly and don't use related keys, TEA is secure? |
Is TEA considered secure? |
I understand that RSA encryption uses this formula:
C = M^e (mod N)
public key is e and N
N is pq - p and q are private key.
mod N makes above function one-way - ie cannot be reversed. Hence given C, e and N, it is not possible (easily) to find M.
Basic idea is that modulo arithmetic on an exponent ... |
- For information theoretic security in Shamir's [m,m] secret sharing scheme, do i need both authentic and confidential channels?
- Another related query is ;is it true that if the channels are only authentic; then the Shamir's [m,m] secret sharing scheme is only computationally secure?
- If confidential channels are... |
>For information theoretic security in Shamir's [m,m] secret sharing scheme, do i need both authentic and confidential channels?
Regular shamir secret sharing provides no protection against modified shares. So we typically assume an honest dealer with authentic and confidential channels. That means the adversary can... |
The main misconception is, that Shamir's secret sharing is not a protocol. It states: If you have enough shares, then you can retrieve the information. And it is information theoretic.
Waht does this mean?
- First off, there is no adversarial model in the sense of malicious or honest-but-curious adversary.
- It... |
Is there a known way to reduce the space complexity of [quantum collision search](http://arxiv.org/pdf/quant-ph/9705002v1.pdf)
<br>
beyond what is offered by the built-in time-space tradeoff, while keeping the
<br>
time complexity significantly below what is achieved by the classical Pollard's rho method?
<br><br> |
I know that the public exponent is always a prime, but what about the private exponent? Is it always a prime too? |
Wikipedia claims that the best attack on the surprisingly simple [TEA](https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm) block cipher, that isn't a related-key attack, has a time complexity of $2^{121.5}$.
So despite how unsophisticated the cipher looks, if I use a KDF properly and don't use related keys, TEA... |
I am trying to read up on the math behind DH and ran into the word generator used a lot. I am not sure what it means. Can someone explain?
I see this [question](http://crypto.stackexchange.com/questions/828/for-diffie-hellman-must-g-be-a-generator) where the OP talks about g as the generator. The accepted answer do... |
What is a generator? |
I am very curious on the fact that SHA, MD5 and all related Hash Functions change the output even by changing one bit in input Message. Why is that? |
[Hashcash](http://en.wikipedia.org/wiki/Hashcash) is a proof-of-work system in which the Sender needs to find $Y$ such as the first (let's say 20) bits of $H(X+Y)$ are zeros where $H$ is a one-way hash function, $X$ is a fixed value and $+$ means concatenation.
The Sender starts with an initial random number $Y$. I... |
I can see many xor and rotation operations in cryptography.
I just want to make some algorithms fast.
So I'm looking for a way to combine between xor rotation operations.
I don't know if it is possible or not.
R3(A) xor R4(B) = A * B (R3,R4 means left rotate shift by 3 bits and 4 bits)
I'm looking for *.... |
Is it possible to combine two operations rotation and xor? |
>For information theoretic security in Shamir's [m,m] secret sharing scheme, do i need both authentic and confidential channels?
Regular shamir secret sharing provides no protection against modified shares. So we typically assume an honest dealer with authentic and confidential channels. That means the adversary can... |
I can see many xor and rotation operations in cryptography. I just want to make some algorithms fast. So, I'm looking for a way to combine between xor rotation operations. I don't know if it is possible or not.
R3(A) xor R4(B) = A * B (R3,R4 means left rotate shift by 3 bits and 4 bits)
I'm looking for `*`. I... |
scrypt takes a salt, and a password plus some cost paramters to generate a key. So say we define it as this:
key = scrypt(password, salt, cost)
I am interested in using it for generating passwords deterministically. E.g. to create a password for amazon or apple I would so something like:
amazonpassword... |
Is concatenated data hashed with scrypt vulunarable to a length extension attack? |
I could not find any mention on the Internet of a proven/known cryptographically secure keyed rolling hash function (ie rolling MAC). Has the question been studied, is it possible to build one ?
By cryptographically secure I mean properties equivalent to HMAC with a cryptographic hash function :
- without knowin... |
Given the sequence 0010001111 (or any other, not homework, but exam practice), how do you use the Berlekamp-Massey algorithm to construct a minimal LFSR?
I have read several definitions of how Berlekamp-Massey works, but I'm missing some simple example that actually demonstrates the algorithm in use.
Trying to us... |
Given the sequence 0010001111 (or any other, not homework, but exam practice), how do you use the Berlekamp-Massey algorithm to construct a minimal LFSR?
I have read several definitions of how Berlekamp-Massey works, but I'm missing some simple example that actually demonstrates the algorithm in use.
Trying to us... |
For clarification: The Pseudo-Hadamard transformation is a reversible transformation of a bit string that provides cryptographic diffusion.
Splitting a bit string (with bit length of $2n$) into two equally large bit strings $a$ and $b$ with size $n$:
$a' = a + b \, \pmod{2^n}$
$b' = a + 2b\, \pmod{2^n}$
Rever... |
I've read the [Bitmessage whitepaper](https://bitmessage.org/bitmessage.pdf) and I found it rather lacking on the details, but it promises anonymous routing. Can it be considered a variation on mix-networks, where each peer acts as a mix-node? |
I have some encrypted binary data I want to decrypt. I know nothing about it, but I can get it encrypted with as many different (random, unknown) symmetric keys as I want. The keys are long enough to not get repeated. Something like this:
A1 = Data ⊕ Key1
A2 = Data ⊕ Key2
A3 = Data ⊕ Key3
...
An = Data ⊕... |
Can I decrypt the message having it encrypted with different keys? |
I have some encrypted binary data I want to decrypt. I know nothing about it, but I can get it encrypted with as many different (random, unknown) symmetric keys as I want. The keys are long enough to not get repeated. Something like this:
$A_1 = Data ⊕ Key_1\\
A_2 = Data ⊕ Key_2\\
A_3 = Data ⊕ Key_3\\
…\\
A_n = ... |
I am new to cryptography. During my learning I am facing a problem with S-DES. I am confused where `P10` to `P8` come from, and I’m confused about the processing of this algorithm. Does anyone have any good article/paper/reference which enables me to understand how to solve it easily?
I am reading following example ... |
In an article about Constructing 16x16 Involutory Binary Matrices of Branch Number 7, It was given
<br>
Matrix 1h =
<br>
1 0 0 0
<br>
0 1 0 0
<br>
0 0 1 0
<br>
0 0 0 1
<br>
Matrix 2h =
<br>
0 0 0 1
<br>
1 0 0 1
<br>
0 1 0 0
<br>
0 0 1 0
<br>
Matrix 4h =
<br>
0 0 1 0
<br>
0 0 1 1
<br>
1 ... |
In an article about Constructing 16x16 Involutory Binary Matrices of Branch Number 7, It was given
Matrix 1h = 1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Matrix 2h = 0 0 0 1
1 0 0 1
0 1 0 0
0 0 1 0
Matrix ... |
A particular educational software program published by a U.S. government agency uses a variant of RC4 to obfuscate its data files (see [Stack Overflow question](http://stackoverflow.com/questions/4334944/how-can-i-defeat-rc4-like-obfuscation)). The variant of RC4 in question is identical to standard RC4 except at the b... |
Does omitting the first two lines of RC4's pseudo-random generation algorithm weaken the cipher? |
In the PDF [“Algebraic Construction of 16×16 Binary Matrices of Branch Number 7 with One Fixed Point”](http://www.singacom.uva.es/~edgar/cactc2012/trabajos/CACT2012_Sakalli.pdf), it was given that:
Matrix 1h = 1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Matrix 2h = ... |
Since I'm unfamiliar with cryptography area I have't been able to find cryptographic hash functions for 32 bit integer keys. It seems all such functions (as I saw [here][1]) are designed to digest a stream having hundreds of bytes. What I need is a cryptographic hash functions that receives a 32-bit length key, and pre... |
Since I'm unfamiliar with cryptography area I have't been able to find cryptographic hash functions for 32 bit integer keys. It seems all such functions (as I saw [here][1]) are designed to digest a stream having hundreds of bytes. What I need is a cryptographic hash functions that receives a 32-bit length key, and pre... |
Since I'm unfamiliar with cryptography area I haven't been able to find cryptographic hash functions for 32 bit integer keys. It seems all such functions (as I saw [here][1]) are designed to digest a stream having hundreds of bytes. What I need is a cryptographic hash function that receives a 32-bit length key, and – p... |
When I configure a Yubikey slot as static, it's not documented or obvious how the static password yielded by a press relates to the AES key I set. For example:
me@mine:~$ ykpersonalize -1 -ostatic-ticket -ofixed=cccccccccccc -a00000000000000000000000000000000
Firmware version 2.3.3 Touch level... |
How is a Yubikey static password derived from the AES key? |
For clarification: The Pseudo-Hadamard transformation is a reversible transformation of a bit string that provides cryptographic diffusion.
Splitting a bit string (with bit length of $2n$) into two equally large bit strings $a$ and $b$ with size $n$:
$a' = a + b \, \pmod{2^n}$
$b' = a + 2b\, \pmod{2^n}$
Rever... |
If when using AES in CTR mode, you decide to use the setup where you combine the IV and the block count value, into a single value, where as suggested here: http://crypto.stackexchange.com/questions/2173/how-to-calculate-an-iv-when-i-have-a-shared-private-key , the first 12 bytes are your IV, and the last 4 bytes the b... |
AES, value of counter when decrypting? |
If when using AES in CTR mode, you decide to use the setup where you combine the IV and the block count value, into a single value, where as suggested here: http://crypto.stackexchange.com/questions/2173/how-to-calculate-an-iv-when-i-have-a-shared-private-key , the first 12 bytes are your IV, and the last 4 bytes the b... |
When I configure a Yubikey slot as static, it's not documented or obvious how the static password yielded by a press relates to the AES key I set. For example:
me@mine:~$ ykpersonalize -1 -ostatic-ticket -ofixed=cccccccccccc -a00000000000000000000000000000000
Firmware version 2.3.3 Touch level... |
I am developing a software in which I am using AES for encrypting messages shared in a group. The key is generated by one user, the admin of the group and needs to be shared with other members. How can I share this key with all other members of the group securely?
Are protocols like Needham-Schroeder, Diffie-Hellma... |
The question asks for a "_cryptographic hash function_" with 32-bit input and 32-bit output, such "_that by changing even a single bit of the input integer, output varies (preferably drastically in Least Significant Bits)_". In cryptographic terms, that criteria is reminiscent of good [diffusion][1] of input changes.
... |
The question asks for a "_cryptographic hash function_" with 32-bit input and 32-bit output, such "_that by changing even a single bit of the input integer, output varies (preferably drastically in Least Significant Bits)_". In cryptographic terms, that criteria is reminiscent of good [diffusion][1] of input changes.
... |
The question asks for a "_cryptographic hash function_" with 32-bit input and 32-bit output, such "_that by changing even a single bit of the input integer, output varies (preferably drastically in Least Significant Bits)_". In cryptographic terms, that criteria is reminiscent of good [diffusion][1] of input changes.
... |
The question asks for a "_cryptographic hash function_" with 32-bit input and 32-bit output, such "_that by changing even a single bit of the input integer, output varies (preferably drastically in Least Significant Bits)_". In cryptographic terms, that criteria is reminiscent of good [diffusion][1] of input changes.
... |
Is there any way to hide message length from adversary in symmetric key cryptography? |
Is there any way to hide message length from adversary in symmetric key cryptography?
suppose we want to hide message length from $active$ and $efficient$ adversaries. |
I am hoping to employ a signed set membership system which is valid iff each signer's contribution to the set is present. The system should allow for two or more mutually exclusive signed sets to be merged into a new signed set without requiring new signatures. Also, unless the set has a single signer, it should be i... |
Is this EdDSA modification secure? |
Obviously such a combination of ciphers is stronger than any of these two ciphers alone.
The Vigenere cipher provides "confusion", while the transposition cipher provides "diffusion". These are terms used by C. Shannon, refer to http://en.wikipedia.org/wiki/Confusion_and_diffusion.
Modern ciphers like AES are mak... |
Is the private key static or variable key in the elgamal algorithm? |
The XOR operator seems to be a frequently used building block inside many cryptographic primitives. As far as I can see, its most desirable properties seem be that for the XOR of two bits $a\oplus b=c$:
1. The information is preserved. Either $a$ or $b$ can be recovered from $c$ and the other bit.
2. The inform... |
The XOR operator seems to be a frequently used building block inside many cryptographic primitives. As far as I can see, its most desirable properties seem be that for the XOR of two bits $a\oplus b=c$:
1. The information is preserved. Either $a$ or $b$ can be recovered from $c$ and the other bit.
2. The inform... |
Is there any way to hide message length from adversary in symmetric key cryptography?
Suppose we want to hide message length from *active* and *efficient* adversaries. |
Since I'm unfamiliar with cryptography area I haven't been able to find cryptographic hash functions for 32 bit integer keys. It seems all such functions (as I saw [here][1]) are designed to digest a stream having hundreds of bytes. What I need is a cryptographic hash function that receives a 32-bit length key, and – p... |
I've already read this:
http://crypto.stackexchange.com/questions/48/is-it-feasible-to-build-a-stream-cipher-from-a-cryptographic-hash-function
However, my proposed construction differs:
Suppose the hash generates N bits. These bits are split into two parts:
S bits are kept secret,
X bits are used for the ... |
The question asks for a "_cryptographic hash function_" with 32-bit input and 32-bit output, such "_that by changing even a single bit of the input integer, output varies (preferably drastically in Least Significant Bits)_". In cryptographic terms, that criteria is reminiscent of good [diffusion][1] of input changes.
... |
The question asks for a "_cryptographic hash function_" with 32-bit input and 32-bit output, such "_that by changing even a single bit of the input integer, output varies (preferably drastically in Least Significant Bits)_". In cryptographic terms, that criteria is reminiscent of good [diffusion][1] of input changes.
... |
The question asks for a "_cryptographic hash function_" with 32-bit input and 32-bit output, such "_that by changing even a single bit of the input integer, output varies (preferably drastically in Least Significant Bits)_". In cryptographic terms, that criteria is reminiscent of good [diffusion][1] of input changes.
... |
I've already read this:
http://crypto.stackexchange.com/questions/48/is-it-feasible-to-build-a-stream-cipher-from-a-cryptographic-hash-function
However, my proposed construction differs:
Suppose the hash generates N bits. These bits are split into two parts:
S bits are kept secret,
X bits are used for the ... |
In theory, does a piece of data exist which, when encrypted (using any method) with a given key, makes some sense when decrypted with the wrong key?
Here, a definition of "some sense" might be something like "when interpreted as ASCII character codes, the data forms a series of mostly correctly spelled English word... |
Is it possible to find data which makes sense when decrypted with different keys? |
Ed25519 signatures consist of (R, s), where s = r + H(RAM)a mod l, and R = rB. This differs from the Schnorr signature where instead of R, the signature contains the hash H(RAM). According to [the Elligator paper][1] (page 5) "one can reconstruct (h, s) from (R, s) and vice versa".
I see that (R, s) -> (h, s) is tri... |
Ed25519 with R replaced by H(RAM)? |
I need to convert a hard knapsack to Superincreasing knapsack
I have these values (3,6,11,22,43,87) Superincreasing
I also have w = 7 and n = 173
I converted the superincreasing to hard(21,42,77,154,128,90) with this type
(Xi * w) mod n
(3 * 7) mod 173 = 21
(6 * 7) mod 173 = 42
(11 * 7) mod... |
How exactly are PRNG's used to encrypt material, and what makes one any more secure than the other? |
Well, first of, a linear congruential generator is not a *secure* pseudo random number generator at all, but if it's just about the basic understanding, we can ignore how you get that stream of random numbers for now.
So, but can you actually use this? The easiest approach is using the stream of random numbers in a ... |
>For information theoretic security in Shamir's [m,m] secret sharing scheme, do i need both authentic and confidential channels?
Regular shamir secret sharing provides no protection against modified shares. So we typically assume an honest dealer with authentic and confidential channels. That means the adversary can... |
I need to convert a hard knapsack to a superincreasing knapsack.
I have these superincreasing values (3,6,11,22,43,87).
I also have w = 7 and n = 173.
I converted the superincreasing values to hard one (21,42,77,154,128,90)
by computing $a_i = x_i * w \bmod{n}$.
(3 * 7) mod 173 = 21
(6 * 7) mod 173 =... |
Here's the idea: given $w$ and $n$, we find a number $v$ such that $vw \equiv 1 \pmod{n}$. In your case of $w=7$ and $n=173$, we have $v=99$; such a $v$ will always exist if $w$ and $n$ are relatively prime, and can be found by [the extended Euclidean algorithm][1]. The value $v$ allows us to map from the "hard value... |
Here's the idea: given $w$ and $n$, we find a number $v$ such that $vw \equiv 1 \pmod{n}$. In your case of $w=7$ and $n=173$, we have $v=99$; such a $v$ will always exist if $w$ and $n$ are relatively prime, and can be found by [the extended Euclidean algorithm][1]. The value $v$ allows us to map from the "hard value... |
I've already read this:
http://crypto.stackexchange.com/questions/48/is-it-feasible-to-build-a-stream-cipher-from-a-cryptographic-hash-function
However, my proposed construction differs…
Suppose the hash generates N bits. These bits are split into two parts:
- $S$ bits are kept secret,
- $X$ bits are used ... |
Building a stream-cipher out of a hash function? |
Im trying to figure out why $\delta$ in the signature part of ElGamal has mod $p-1$ when $\gamma$ has mod $p$?
$\gamma = \alpha^k \mod p$
$\delta = (x-a\gamma)k^{-1} \mod p-1$
|
ElGamal digital signature. why mod p-1 in delta? |
Ed25519 signatures consist of $(R, s)$, where $s = r + H(RAM)a$ $mod$ $l$, and $R = rB$. This differs from the [Schnorr signature][1] where instead of $R$, the signature contains the hash $h=H(RAM)$. According to [the Elligator paper][2] (page 5) "one can reconstruct $(h, s)$ from $(R, s)$ and vice versa".
I see tha... |
This recent new curve mentions something that's new to me: twist security.
http://safecurves.cr.yp.to/bada55.html
Are the existing C25519/Ed25519 curves secure against this form of attack? |
Is C25519/Ed25519 "twist secure"? |
Why is XOR preferred over XNOR? |
Do you gain any advantage by knowing the factorization of $M$ (over just knowing $M$ itself) in the Blum Blum Shub cryptosystem?
The only advantage I see is being able to calculate the $i$-th number directly, as opposed to iterating to it. This doesn't seem like a very large gain to me. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.