instruction stringlengths 15 30k |
|---|
Cryptographically secure random number generators seem to have similar properties to symmetric encryption:
- initial seed is permuted to produce a random numbers (*key and ciphertext*)
- given the seed, they produce a random number that cannot be linked back to the initial seed (*diffusion*)
- changing a single va... |
Formal relationship between encryption and random number generators? |
I'm encrypting one of the standard TDEA/3DES/DES-EDE test vectors with openssl:
<?php
$key = pack('H*', '0123456789ABCDEF' . '23456789ABCDEF01' . '456789ABCDEF0123');
$result = openssl_encrypt('The quick brown fox jump', 'des-ede3', $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING);
echo ... |
Which multiplicatively homomorphic encryption scheme supports encryption of 0? |
>How can a cryptosystem be unconditional secure ?
The definition of an unconditional secure cryptosystem states that the cryptosystem cannot be broken even with infinitely computational ressources and time.
However, since most books define the keyspace $\mathcal K$ to be finite, then with infinite time any computat... |
How can a cryptosystem be unconditional secure? |
Assume the following simplified protocol:
- seed = curve25519SharedKey(theirPublicKey, myPrivateKey)
- sharedKey = scrypt(seed, salt, sufficientlyHardWorkFactors...)
- cipherText = aes256(sharedKey, clearText)
Does using a slow-hash on the output of an asymmetric key-exchange offer any more protection in a q... |
>Does using a slow-hash on the output of an asymmetric key-exchange
<br>
offer any more protection in a quantum-computing era?
No. $\:$ A quantum attacker would simply find `seed` even if you didn't use "a slow-hash on" it.
<br><br>
>Is the algorithm (greatly) diminished, or completely broken?
The algorithm w... |
>Does using a slow-hash on the output of an asymmetric key-exchange
<br>
offer any more protection in a quantum-computing era?
No. $\:$ A quantum attacker would simply find `seed` even if you didn't use "a slow-hash on" it.
<br><br>
>Is the algorithm (greatly) diminished, or completely broken?
The algorithm w... |
The other answers for this confuse me, I know the principle of d in terms of the equation it has to satisfy. However I'm not sure how I would go about finding the private exponent without trial and error. I want to implement this in a program, but I'm not quite sure the algorithm I would use to find d. Can someone expl... |
When reading about different algorithms, I often encounter claims that various algorithms are "fast in software" (e.g. Salsa20) or "fast in hardware" (e.g. DES). What properties make a cipher relatively faster in hardware or faster in software? Why would something be fast to implement in hardware but much slower in a s... |
What makes an algorithm "fast in software" vs. "fast in hardware"? |
Can a cryptosystem be unconditional secure if the same key $k \in \mathcal K$ is used for more than one encryption ?
I know that the one-time-pad doesn't have perfect secrecy and doesn't provide unconditional security provided the same key is used for more than one encryption.
Is this general for all encryption s... |
Can a cryptosystem be unconditional secure if the same key $k \in \mathcal K$ is used for more than one encryption? |
Is unconditional security and perfect secrecy one and the same thing, i.e a cryptosystem provides unconditional security if and only if it provides perfect secrecy ?
I've wondered about the above and seen that the one-time-pad provides unconditional security in terms of perfect secrecy. Does this hold in general ?
|
Does a cryptosystem provides unconditional security if and only if it provides perfect secrecy? |
"In software" means programming the cipher on a multifunctional processor or smart chip. The normal instruction set is used to build the algorithm, and not available operations have to be emulated.
"In hardware" means building the cipher in real hardware, like on a [Field-programmable gate array][1] (FPGA) or [Applica... |
I heard that DES is technically 'broken' because of attacks involving large amounts of known plaintext. These attacks are obviously academic and highly complicated, so for some intuition I was hoping that somebody could explain (for example) how much plaintext is required to determine the key in a generic/simple Feiste... |
KPA on Feistel cipher? |
[Camellia][1] perhaps? NESSIE (EU) and CRYPTREC (Japan) both endorse it.
Your requirements are brief and mysterious so it's difficult to give further suggestions.
[1]: https://en.wikipedia.org/wiki/Camellia_%28cipher%29 |
Putting some of my comments into writing. This is less than an answer but too much for a comment. In the comments I had claimed to apply SMT to solve case 1 - this is false, I was mistaken. I have had cases 2 and 3 running SMT (boolector, Z3, CVC4, yices) for some time without success. The closest thing to success ... |
The [md5 specification](https://tools.ietf.org/html/rfc1321#section-3.4) gives a series of 4 rounds to execute over a 16-word block.
Each round has a repeating sequence of 4 shift amounts (`s` in `[abcd k s i]`) :
- 7, 12, 17 and 22 for the round 1
- 5, 9, 14 and 20 for the round 2
- 4, 11, 16 and 23 for the... |
How were shift amount constants in MD5 found? |
I'm using Java to generate encrypted strings, and i get this warning at build time :
ECB encryption mode should not be used
So i'm wondering why shouldn't i use ECB and what can i use instated ?
Thanks. |
Why shouldn't i use ECB encryption? |
I'm using Java to generate encrypted strings, and I get this warning at build time:
> ECB encryption mode should not be used
So I'm wondering why I shouldn't use ECB and what I can use instead? |
Why shouldn't I use ECB encryption? |
I am playing around with the following hashing scheme:
* Start with a domain string (same for all users),
* Allow every user to mutate it in any way defining their own custom replacement rules,
* Append the user ID to the result of the above mutation,
* Allow the user to choose their own "work factor" for PBKDF2-... |
Viability of an "Unconventional" Hashing Scheme? |
This seems like quite a dumb question, but I really don't know if I'm finding a answer anywhere. I understand that if i access a website that is secured with TLS, we exchange ciphersuites and so on, then decide on what algorithms to use. But, specifically, what is an example of a specific MAC my browser could use with ... |
Specific example of a MAC in TLS? |
I am playing around with the following hashing scheme:
* Start with a domain string (same for all users),
* Allow every user to mutate it in any way defining their own custom replacement rules,
* Append the user ID to the result of the above mutation,
* Allow the user to choose their own "work factor" for PBKDF2-... |
## Why shouldn't I use ECB encryption?
The main reason not to use [ECB mode](//en.wikipedia.org/wiki/ECB_mode) encryption is that it's not [semantically secure](//en.wikipedia.org/wiki/Semantic_security) — that is, merely observing ECB-encrypted ciphertext can leak information about the plaintext (even beyond ... |
[This question](https://crypto.stackexchange.com/questions/1474/rsa-if-n-35-show-that-e-will-equal-d) shows that there are at least two valid RSA moduli $n$, namely $35$ and $91$, such that for **any** $e$ coprime to $\varphi(n)$, $$e^2\equiv1\mod\varphi(n)\text.$$
Reading the linked question, I wondered if there is a... |
For which RSA moduli, precisely, is $e=d$ for all $e$? |
[This question](https://crypto.stackexchange.com/questions/1474/rsa-if-n-35-show-that-e-will-equal-d) shows that there are at least two valid RSA moduli $n$, namely $35$ and $91$, such that for **any** $e$ coprime to $\lambda(n)$, $$e^2\equiv1\mod\lambda(n)\text.$$
Reading the linked question, I wondered if there is a... |
> I wondered if there is a "simple" description of the set of numbers n that have this property.
Yes, there is; $n$ has a prime factorization $p_1 \cdot p_2 \cdot ... \cdot p_n$ such that all the primes are unique (i.e. $n$ is square-free), and for each prime factor $p_i$, $p_i-1$ must be a divisor of 24. In other ... |
## Why shouldn't I use ECB encryption?
The main reason not to use [ECB mode](//en.wikipedia.org/wiki/ECB_mode) encryption is that it's not [semantically secure](//en.wikipedia.org/wiki/Semantic_security) — that is, merely observing ECB-encrypted ciphertext can leak information about the plaintext (even beyond ... |
I am playing around with the following hashing scheme:
* Start with a domain string (same for all users),
* Allow every user to mutate it in any way defining their own custom replacement rules,
* Append the user ID to the result of the above mutation,
* Allow the user to choose their own "work factor" for PBKDF2-... |
The [md5 specification](https://tools.ietf.org/html/rfc1321#section-3.4) gives a series of 4 rounds to execute over a 16-word block.
Each round has a repeating sequence of 4 shift amounts (`s` in `[abcd k s i]`) :
- 7, 12, 17 and 22 for the round 1
- 5, 9, 14 and 20 for the round 2
- 4, 11, 16 and 23 for the... |
Does a cryptosystem provide unconditional security if and only if it provides perfect secrecy? |
I am looking to encrypt a piece of data using AES-GCM with a full 16-byte GCM Tag and send it over the network using UDP. Is it safe to assume using the AEAD nature of AES-GCM that performing authenticated decryption will prevent ciphertext length extension attacks with an implicit length?
In short, I want to de... |
Is AES-GCM length extension attack possible using authenticated decryption? |
It depends on what you think of as an alternative.
If you think of the scheme where you do not use $M$ as a modulus, but the keys a picked as:
$$
k \leftarrow \{1, \ldots, M-1\}
$$
Encryption:
$$
C = d + k
$$
Decryption:
$$
d = C - k
$$
Then the scheme is insecure. One way to see this is to note that ... |
I'm developing messenger application with encrypted chats.
In the first version of app I've used PBKDF2 (10000 iterations, SHA1, random salt) to extend short user password and generate keys to encrypt (AES256) and sign message (HMAC).
In the current version of app I generate random 130-bit key and use it instead... |
I'm developing a messenger application with encrypted chats.
In the first version of the app I've used PBKDF2 (10000 iterations, SHA1, random salt) to extend a short user password and generate keys to encrypt (AES256) and sign message (HMAC).
In the current version of the app I generate a random 130-bit key and ... |
I'm developing a messenger application with encrypted chats.
In the first version of the app I've used PBKDF2 (10000 iterations, SHA1, random salt) to extend a short user password and generate keys to encrypt (AES256) and sign message (HMAC).
In the current version of the app I generate a random 130-bit key and ... |
What's that property called when a scheme is secure even if you encrypt the decryption key? Some schemes have problems when your plaintext is the decryption key (or just the key if symmetric). |
You're right: there is no need for [key stretching](//en.wikipedia.org/wiki/Key_stretching) if your key already has enough entropy to resist brute force attacks without it. A 128-bit keyspace should be plenty for that.
AFAIK, there is no significant difference between HKDF and single-iteration PBKDF2 in practice. ... |
I'm trying to understand how a XOR affect traces of power consumption in a Differential Power Analysis on smartcards.
What's the difference in energy radiated in a 1 ^ 1 and in a 0 ^ 1?
If I understand correctly we have a XOR gate, and if a 1 is xored with a 0 then electrons in the 1 branch just continue flowing ... |
Consider I have two polynomials $f_1$ and $f_2$ of the same degree. I want to secure them (using any kind of encryption except FHE) and outsource them to an untrusted server. I want him to compute the least common multiple (LCM) of these two polynomials and return it to me.
* Question: Is there any protocol support... |
Consider I have two polynomials $f_1$ and $f_2$ of the same degree. I want to secure them (using any kind of encryption except FHE) and outsource them to an untrusted server. I want him to compute the least common multiple (LCM) of these two polynomials and return it to me.
* Question: Is there any protocol support... |
Consider I have two polynomials $f_1$ and $f_2$ of the same degree. I want to secure them (using any kind of encryption except FHE) and outsource them to an untrusted server. I want him to compute the least common multiple (LCM) of these two polynomials and return it to me.
* Question: Is there any protocol support... |
Is it possible to construct a binary hashing function based on any existing cryptographic hash function satisfying the associative property but not the commutative property? So formally:
Using an existing hashing function
$h: \mathbb{B}^* \rightarrow \mathbb{B}^k $
to construct
$H: \mathbb{B}^* \times \mathbb{B}... |
I have a problem that I don't know how to solve
Assume that H is a cryptographic hash function with output size 80 bits. Assume that ABC123 is a specifically designed line of hardware chips for computing H. where ABC123 can create 10000 hash values a second. This product line is the best, fastest and affordable, in... |
I would like to know what is the real purpose of using a modulus in the equivalent of a Vernam cipher:
Data $d$, large number $M$.
Assume the key length is $\lambda$ bits. Then $M$ could be $2^\lambda$.
$k$ is picked from $\{0,1\}^\lambda$ using a pseudo random function (PRF)
Encryption: $C = k + d \bmod{M}$ ... |
I would like to know what is the real purpose of using a modulus in the equivalent of a Vernam cipher:
Data $d$, large number $M$.
Assume the key length is $\lambda$ bits. Then $M$ could be $2^\lambda$.
$k$ is picked from $\{0,1\}^\lambda$ using a pseudo random function (PRF)
Encryption: $C = k + d \pmod{M}$ ... |
If I wanted to use hmac for proving that a value hadn't been tampered with, how many times can I use a key before it needs to be rotated? |
http://crypto.stackexchange.com/questions/8500/with-hmac-can-an-attacker-recover-the-key-given-many-known-plaintext-tag-pairs?rq=1
I guess this constitutes an answer. I can keep the key as long as I think I can keep it secure. Rotating the key would give me forward secrecy at least. |
How many times can a key be used for HMAC-SHA256 before it needs to be rotated? |
I heard that DES is technically *“broken”* because of attacks involving large amounts of known plaintext. These attacks are obviously academic and highly complicated, so for some intuition I was hoping that somebody could explain (for example) how much plaintext is required to determine the key in a generic/simple Feis... |
I'm trying to understand how a XOR affect traces of power consumption in a Differential Power Analysis on smartcards.
What's the difference in energy radiated in a $1 \oplus 1$ and in a $0 \oplus 1$?
If I understand correctly we have a XOR gate, and if a $1$ is xored with a $0$ then electrons in the 1 branch just... |
According to [Kerckhoffs's principle][1] *"A cryptosystem should be secure even if everything about the system, except the key, is public knowledge."* Now I want to throw in a provoking formula of mine which refutes Kerckhoff's principle which he formulated in 1883, and come up with a new and updated principle for encr... |
Do Brute-Force Attacks and Cryptanalysis refute Kerckhoffs's principle? |
According to [Kerckhoffs's principle][1] *"A cryptosystem should be secure even if everything about the system, except the key, is public knowledge."* Now I want to throw in a provoking formula of mine which refutes Kerckhoff's principle which he formulated in 1883, and come up with a new and updated principle for encr... |
According to [Kerckhoffs's principle][1] *"A cryptosystem should be secure even if everything about the system, except the key, is public knowledge."* Now I want to throw in a provoking formula of mine which refutes Kerckhoff's principle which he formulated in 1883, and come up with a new and updated principle for encr... |
According to [Kerckhoffs's principle][1] *"A cryptosystem should be secure even if everything about the system, except the key, is public knowledge."* Now I want to throw in a provoking formula of mine which refutes Kerckhoff's principle which he formulated in 1883, and come up with a new and updated principle for encr... |
According to [Kerckhoffs's principle][1] *"A cryptosystem should be secure even if everything about the system, except the key, is public knowledge."* Now I want to throw in a provoking formula of mine which refutes Kerckhoff's principle which he formulated in 1883, and come up with a new and updated principle for encr... |
Hello I am having trouble understanding the algorithm implementation in hardware of the reduction process over galois fields of `F(2^163)`
In the following process it looks like we are calculating the zc(z) value from `2m-2 downto m`
which the first half of c(z)
but I am not getting to understand what is r(z) and ho... |
First you should note that Kerckhoff's principle does **not** state that you should publish everything about your system, except the key. It tells you that you should design your system with the goal that it's secure even if the system is published.
The next problem with your post is that it does not consider the di... |
Why do most literature while discussing squares or square root modulo a prime P, consider P to be congruent to 3 mod 4? |
Significance of 3mod4 in squares and square roots mod n? |
From [Wikipedia][1]
> Second pre-image resistance
>
> Given an input m1 it should be difficult to find another input m2 such
> that m1 ≠ m2 and hash(m1) = hash(m2). Functions that lack this
> property are vulnerable to second-preimage attacks.
>
> Collision resistance
>
> It should be difficult to find tw... |
From [Wikipedia][1]:
> Second pre-image resistance
> -
> Given an input $m_1$ it should be difficult to find another input $m_2$ such
> that $m_1$ ≠ $m_2$ and $\operatorname{hash}(m_1) = \operatorname{hash}(m_2)$. Functions that lack this
> property are vulnerable to second-preimage attacks.
>
> Collision res... |
First of all I have to say It's a homework question but since I have no one to consult with, I ended up here :)
Suppose a case in which you are the manager of a company and all employers encrypt their messages with your public key and send them to you.You can decrypt them with your private key and read them.
Now ... |
[NIST SP 800-20 Appendix A][1] has what presumably are supposed to be test vectors for 3DES except almost all of the test vectors utilize 8-bit keys and not the 24-bit keys that 3DES is supposed to have. See, for example, table's A.2, A.3, A.4, A.8 and A.10. So what's the point? These test vectors don't seem like they'... |
Informally, a "Gap" problem is the one that arises when solving the computational (or search) version using an oracle for the decisional version.
For example, the Gap Diffie-Hellman Problem (GDH) is to solve the Computational Diffie-Hellman (CDH) problem with the help of a Decisional Diffie-Hellman (DDH) Oracle (whi... |
[NIST SP 800-20 Appendix A][1] has what presumably are supposed to be test vectors for 3DES except almost all of the test vectors utilize 8-byte keys and not the 24-byte keys that 3DES is supposed to have. See, for example, table's A.2, A.3, A.4, A.8 and A.10. So what's the point? These test vectors don't seem like the... |
Embedded devices send messages to the server. The server occasionally sends messages to individual devices(Reboot, upgrade firmware etc)
After some research this is my ad-hoc solution:
1) Each devices gets a unique id(like MAC address) and a public/private key pair when first programmed at the factory. The server... |
I think that this is not possible with a conventionnal public Key (Probably I'm wrong ?). But this question could easilly be solved by IBE as introduced by Dan Boneh in the seminal paper "Identity-Based Encryption from the Weil Pairing.
This new system introduced in the early 2000, allows the Delegation of Decryption ... |
What is the difference between chosen plaintext and chosen ciphertext attack?
In both of these adversary has access to paintext-ciphertext pairs.Then where lies the difference? |
This is the PSKC standard
https://tools.ietf.org/rfc/rfc6030.txt
In Section 6.1
6.1. Encryption Based on Pre-Shared Keys
They have the following
Plain Text = 3132333435363738393031323334353637383930
Algo = aes-128-cbc
pkcs#5 padding
Encryption Key = 1234567890123456789012345678... |
I am not the best cryptologer and therefore I have some questions so I learn more and get better. Heres the questions:
1. What is ECB, CBC, PCBC... and so on. And what should I have for default if I want to encrypt with Serpent?
2. What is Initialization vector (IV)? And what should I have for default?
I want ... |
I am not the best cryptologer and therefore I have some questions so I learn more and get better. Heres the questions:
What is Initialization vector (IV)? MUST I use it or not?
|
Which of the Block cipher mode is **MOST** secure? I dont care about the performance just the **most** secure |
Which Block cipher mode should I use? |
Is it possible to construct a binary reducing function based on any existing cryptographic hash function satisfying the associative property but not the commutative property? So formally:
Using an existing hashing function
$h: \mathbb{B}^* \rightarrow \mathbb{B}^k $
to construct
$R: \mathbb{B}^* \times \mathbb{B... |
First of all I have to say it's a homework question but since I have no one to consult with, I ended up here :)
Suppose a case in which you are the manager of a company and all employees encrypt their messages with your public key and send them to you.You can decrypt them with your private key and read them.
Now ... |
My software uses a 3rd party encryption appliance. One of the capabilities they allow is for client software to supply an IV.
i have been trying to understand - **why would they not generate a random number on their own to use as an IV?** What is the advantage of letting the client specify an IV - I can only think ... |
i looked here: http://www.icg.isy.liu.se/courses/tsit03/forelasningar/cryptolecture04.pdf on page 46. It seems to say that if we have a Feistel cipher, and plaintexts $(L_0, R_0)$ and $(L_{0}^{*}, R_))$ with corresponding encryptions, then we can determine the key? But isn't this this not the case by Luby-Rackoff? I'm ... |
Good day all,
I am implementing a security protocol based on discrete log. I came across the equation p = kq + 1. Understand that based on number theories that both p and q should be large enough to be "safe". However, how does it justifies safe? Say I chose p = 7, k = 2 and q = 3, will my implementation be screwed ... |
The diffusion property of a cipher defined by Shannon refers to the ability of a cipher to cause a lot off bits in the cipher text to be modified when even a single bit in the plaintext is flips. However, in stream ciphers, when the cipher text is the xor of the plaintext with the key pattern, a flip in the plaintext w... |
I am implementing a security protocol based on discrete log. I came across the equation $p = kq + 1$. Understand that based on number theories that both $p$ and $q$ should be large enough to be "safe". However, how does it justifies safe? Say I chose $p = 7$, $k = 2$ and $q = 3$, will my implementation be screwed up? |
I am trying to write some code using the Web Crypto API (http://www.w3.org/TR/WebCryptoAPI/#algorithm-overview) which provides only some of the block cipher modes for AES, intentionally **excluding** AES-ECB (preumably because it is not normally a good choice for anything).
My need is to use AES-ECB-nopadding as p... |
Can I simulate AES-ECB with other block cipher mode? |
The diffusion property of a cipher defined by Shannon refers to the ability of a cipher to cause a lot off bits in the cipher text to be modified, when even a single bit in the plaintext is flips.
However, in stream ciphers – when the cipher text is the xor of the plaintext with the key pattern – a flip in the plai... |
Why is multiple hashing not a good idea? |
I am trying to understand how one can retrieve the secret exponent via a simple power analysis.
Lets suppose that the exponentiation by squaring algorithm is implemented in its simplest form :
Function exp-by-squaring(x,n)
if n<0 then return exp-by-squaring(1/x, -n);
else if n=0 then return ... |
What are the security implications of multiple hashing? |
I am trying to write some code using the Web Crypto API (http://www.w3.org/TR/WebCryptoAPI/#algorithm-overview) which provides only some of the block cipher modes for AES, intentionally **excluding** AES-ECB (presumably because it is not normally a good choice for anything).
My need is to use AES-ECB-nopadding as ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.