instruction stringlengths 15 30k |
|---|
Especially in relation to stream ciphers, I frequently read about (sometimes theoretical, sometimes practical) attacks that are able to "distinguish a ciphertext from a truly random stream".
What's logic to me is that - just because a ciphertext looks random, it isn't necessarily random. Looking around, the general ... |
How exactly is "randomness" defined in the realms of cryptography? |
How exactly is "true randomness" defined in the realms of cryptography? |
Randomness is not a property of strings of bits (or characters of any sort). Rather it is a property of the process that generates those strings. However, it is convenient to conflate the string with the thing that produced the string, and thus to speak about strings being 'random' or 'not random'. The string '00000... |
Especially in relation to stream ciphers, I frequently read about (sometimes theoretical, sometimes practical) attacks that are able to "distinguish a ciphertext from a truly random stream".
What's logic to me is that - just because a ciphertext looks random, it isn't necessarily random. Looking around, the general ... |
How hard/easy will be to break a SHA-1 or SHA-256 hash if the attacker knows part of the original text? |
I'm creating an algorithm to hash some text variables (20/30 characters long) to send them across an insecure channel. I'm not dealing with high security data, so no credits card numbers or any other very sensitive information.
The original text variable is composed like this:
{secret-client-code,public-rando... |
[Counter (CTR) mode][1], which is a block cipher mode of operation, has some desirable qualities (no padding, parallel encryption and decryption), but at the cost of failing badly when non-unique counter blocks (the nonce combined with the counter that acts as input to the block cipher) are used. I'd like to share my ... |
Relying solely on randomization for the block counter is actually more likely to cause a nonce collision in case of a system time reset. This only gets worse as the message length increases. There is also no reason for the static 0 byte in the nonce. This is further exacerbated if the PRNG takes the system time as inpu... |
Relying solely on randomization for the block counter is actually more likely to cause a nonce collision in case of a system time reset. This only gets worse as the message length increases. This is further exacerbated if the PRNG takes the system time as input, or does not have enough seed entropy. There is also no re... |
[RFC5639](http://tools.ietf.org/rfc/rfc5639.txt) defines some curve parameter for Elliptic curve cryptography.
Aren't there any curve parameter database for Hyperelliptic curve cryptography? What I can only find was that written in [this PDF](http://www.craigcostello.com.au/wp-content/uploads/SanDiegoTalk2012.pdf). |
Curve parameter for hyperelliptic curve cryptography? |
I think there are two issues involved here:
1. How do you tell if a ciphertext has the properties of a truly random stream?
2. How do you tell if a stream IS truly random?
For the first part, there are many statistical techniques. But the basic question is whether there is any detectable relationship between t... |
Can an RSA private key have several public keys? |
I'm just reviewing a program someone wrote to provide high quality random data using an entropy collector and a hash based whitening technique. I'll try summarize the process:
1. Collect entropy from sources into separate arrays e.g.
- a) milliseconds between key presses
- b) milliseconds between mouse clicks
... |
The definition of adversary's advantage seems a bit odd for me and I am wondering why do we use it to measure the power of an adversary rather than just use the probability of a PPL adversary succeeding in answering an computationally hard question? |
What is adversary's advantage in cryptography and why we use it? |
Dual-ec-drgb is short for Dual Elliptic Curve Deterministic Random Bit Generator; a pseudorandom number generator based on the elliptic curve discrete logarithm problem.
It was standardized in [NIST SP 800-90A](http://csrc.nist.gov/publications/nistpubs/800-90A/SP800-90A.pdf), but Dual_EC has a pretty negative imag... |
The definition of adversary's advantage seems a bit odd for me and I am wondering why do we use it to measure the power of an adversary rather than just use the probability of a PPT adversary succeeding in answering an computationally hard question? |
In Simple Power Analyse Attack the difference in power consumption during multiply or square operation is used.
In RSA decryption process with "Square and Multiply" algorithm both square and multiply operations are executed if bit value in key is 1, and only square operation is executed if bit value in key is 0.
... |
I'm trying to write my own RSA implementation using the textbook approach -- which I know is not optimal -- of picking primes p and q, then computing Euler's totient phi, then randomly picking an 'e' which is relatively prime to phi, and then computing a d such that (d*e) mod phi = 1.
For that last step, I'm using t... |
RSA - How does one deal with a negative d? |
I would like to know if we can set the public exponent we want with **openssl rsa** or if it is really limited to 2 possible exponents :
- 3
- 65537
If yes, why ? |
Openssl & RSA : how many public exponent possible? |
I would like to know if it is possible to set the public exponent we want with **openssl rsa** or if it is really limited to 2 possible exponents :
- 3
- 65537
If yes, why ? |
Long ago, I read that the definition of "cryptographic hash function" is "collision-resistant one-way function". (A similar definition shows up in the FIPS standards for SHA-1 etc.)
But this is not a sufficient property for many of the modern uses of cryptographic hash functions, like Bitcoin. What they really want ... |
Formal definition of "explicit" algorithm? |
How much is secure to use crypto library the Bouncy Castle for writing applications on Java or .Net platform? |
Is using the Bouncy Castle library for Java and .Net applications secure? |
In a "Simple Power Analyse Attack", the difference in power consumption during multiply or square operation is used.
In the RSA decryption process with the "Square and Multiply" algorithm, both square and multiply operations are executed if bit value in key is 1 and only square operation is executed if bit value in... |
I'm trying to write my own RSA implementation using the textbook approach — which I know is not optimal — of picking primes $p$ and $q$, then computing Euler's totient $phi$, then randomly picking an 'e' which is relatively prime to $phi$, and then computing a $d$ such that ($d*e$) mod $phi$ = 1.
For that last step,... |
How does one deal with a negative "d" in RSA? |
I would like to know if it is possible to set the public exponent we want with *"OpenSSL RSA"* or if it is really limited to 2 possible exponents:
- 3
- 65537
If yes, why ? |
A long time ago, I read that the definition of "cryptographic hash function" is "collision-resistant one-way function". (A similar definition shows up in the FIPS standards for SHA-1 etc.)
But this is not a sufficient property for many of the modern uses of cryptographic hash functions, like Bitcoin. What they reall... |
Openssl & RSA : how many public exponents are possible? |
How do we prove that AES, DES etc. are secure? I've read about them and know the basics on how they work, but I still don't quite understand how we can be sure they are secure? What are the proofs? |
How do we prove that AES, DES etc. are secure? |
Why are huge prime numbers important in cryptography? |
As I understand it, bruteforcing a [Diffie-Hellman][1] generated secret key takes $P-1$ attempts to crack the shared secret, where $P$ is a very large prime used for modulus. If your $P$ is quite large, which according to the wikipedia page ought to be about 300 digits, then theoretically your encrypted data is secure.... |
Is prime regeneration necessary for every new session using a Diffie-Hellman key exchange? |
As I understand it, bruteforcing a [Diffie-Hellman][1] generated secret key takes $P-1$ attempts to crack the shared secret, where $P$ is a very large prime used for modulus. If your $P$ is quite large, which according to the wikipedia page ought to be about 300 digits, then theoretically your encrypted data is secure.... |
I was trying to understand MD5 and got stuck with this question, its from Michael sipser's book on Information security :
The MD5 collision in Problem 25 is said to be meaningless since the
two messages appear to be random bits, that is, they do not carry
any meaning. Currently, it is not possible to generate a ... |
I was trying to understand MD5 and got stuck with this question, its from Michael sipser's book on Information security Principles and Practice, 2nd edition
The MD5 collision in Problem 25 is said to be meaningless since the
two messages appear to be random bits, that is, they do not carry
any meaning. Currently... |
**How long are parameters used for?**
Usually $g$ and $p$ are kept static for a very long time indeed. In fact, the values to use are actually written in to _standards_. See [here][1] for an example. Those were values standardised ten years ago.
So the answer is basically decades.
**The impossibility of brute ... |
**How long are parameters used for?**
Usually $g$ and $p$ are kept static for a very long time indeed. In fact, the values to use are actually written in to _standards_. See [here][1] for an example. Those were values standardised ten years ago.
So the answer is basically decades.
**The impossibility of brute ... |
I am using OpenSSL libs to generate signatures. Internally, I learn that a signature is a hash of the message with some padding added to it.
I am trying to understand the structure of a signature. If I use SHA1 as the digest algorithm for the signature, and say a 1024 bit Key, can you please tell me how the signature ... |
How does an RSA signature look like? |
I am using OpenSSL libs to generate signatures. Internally, I learn that a signature is a hash of the message with some padding added to it.
I am trying to understand the structure of a signature. If I use SHA1 as the digest algorithm for the signature, and say a 1024 bit Key, can you please tell me how the signature ... |
I was trying to understand MD5 and got stuck with this question, its from Michael sipser's book on Information security Principles and Practice, 2nd edition
> The MD5 collision in Problem 25 is said to be meaningless since the
two messages appear to be random bits, that is, they do not carry
any meaning. Current... |
I'm searching Why the SHA-1 is collision resistance? Anybody could help me with the proof or say me where I can find this proof? |
Why initialize SHA-1 with specific buffer: h0 = 0x67452301, h1 = 0xEFCDAB89, h2 = 0x98BADCFE, h3 = 0x10325476, h4 = 0xC3D2E1F0? |
Why initialize SHA1 with specific buffer? |
**How long are parameters used for?**
Usually $g$ and $p$ are kept static for a very long time indeed. In fact, the values to use are actually written in to _standards_. See [here][1] for an example. Those were values standardised ten years ago.
So the answer is basically decades.
**The impossibility of brute ... |
A long time ago, I read that the definition of "cryptographic hash function" is "collision-resistant one-way function". (A similar definition shows up in the FIPS standards for SHA-1 etc.)
But this is not a sufficient property for many of the modern uses of cryptographic hash functions, like Bitcoin. What they reall... |
Does ELGAMAL Encryption create different key for each sending block? |
One way to address this question is 'if there was such a vulnerability in reusing $g$ and $P$ multiple times, then that vulnerability can be used to attack a specific exchange, even if they use $g$ and $P$ only that one time'. That is, changing $g$ and $P$ cannot help matters.
Here is how this observation works; su... |
A long time ago, I read that the definition of "cryptographic hash function" is "collision-resistant one-way function". (A similar definition shows up in the FIPS standards for SHA-1 etc.)
But this is not a sufficient property for many of the modern uses of cryptographic hash functions, like Bitcoin. What they reall... |
Let's say that we have a key exchange of some sort, which leaves *A* and *B* sharing the long-term secret $S$. Then, *A* and *B* want to use AES-CTR for the communication, which leaves us with several possible strategies:
1. During the key exchange, A and B both generate and send nonces $N_a$ and $N_b$ which are mix... |
**How long are parameters used for?**
Usually $g$ and $p$ are kept static for a very long time indeed. In fact, the values to use are actually written in to _standards_. See [here][1] for an example. Those were values standardised ten years ago.
So the answer is basically decades.
**The impossibility of brute ... |
An even more robust approach could be to use something like [SIV mode](http://www.cs.ucdavis.edu/~rogaway/papers/keywrap.html) ([RFC 5297](http://tools.ietf.org/html/rfc5297)) with a nonce composed of a timestamp and a random value (and possibly, if practical, a message number).
Basically, when encrypting a message,... |
SHA-1 is initialize with a specific buffer:
h0 = 0x67452301
h1 = 0xEFCDAB89
h2 = 0x98BADCFE
h3 = 0x10325476
h4 = 0xC3D2E1F0?
Why? |
How much is secure to use crypto library the Bouncy Castle for writing applications on Java or .Net platform?
I am worring about timing attacks against ECC key exchange scheme. Suppose I need to extend the protocol TLS to be able to use other key exchange scheme based on elliptic curves. The Bouncy Castle's impleme... |
I am trying to look into a relation between the following three problems which are widely used to build public crypto systems:
- Integer Discrete log
- Elliptic Curve Discrete log
- Integer Factorization
Can any of these problems be reduced to another such that an efficient solution to one of them yields an eff... |
I'm not sure what the precise words I am looking for are so I apologize if there is a better way to phrase this. What I am thinking of is ways to transfer an identity in a way that it is tamper resistant and can be used for authentication.
Normally to know who someone is people use driver licenses or a person's fac... |
I'm not sure what the precise words I am looking for are so I apologize if there is a better way to phrase this. What I am thinking of is ways to transfer an identity in a way that it is tamper resistant and can be used for authentication.
Normally to know who someone is people use driver licenses or a person's fac... |
One way to address this question is to notice that if there was such a vulnerability in reusing $g$ and $P$ multiple times, then that vulnerability can be used to attack a specific exchange, even if they use $g$ and $P$ only that one time. That is, changing $g$ and $P$ cannot help matters.
Here is how this observat... |
I'm not sure what the precise words I am looking for are so I apologize if there is a better way to phrase this. What I am thinking of is ways to transfer an identity in a way that it is tamper resistant and can be used for authentication.
Normally to know who someone is people use driver licenses or a person's fac... |
have a project in which I have to implement an en/de-cryption structure using a standard AES block of 128-bits in VHDL and I think I'm a bit confused. So I'd like to ask some questions about AES and its modes of operation.
1. When we say that we use a 128-bit key, does it mean that the data input's size is 128... |
If you have the setting of $G$ being a prime order $p$ group (written multiplicatively) generated by $g$ and your public-secret key pair is $(pk,sk)=(y=g^x,x)$, then encrypting a single message $m\in Z_p$ amounts to choosing $k\in_R Z_p$ and computing $(c_1,c_2)=(g^k,my^k)$.
If you have a message $m=(m_1,\ldots,m_l... |
I need to extend the TLS protocol to be able to use other key exchange scheme based on elliptic curves. I am planning to use BouncyCastle's implementation in Java and in .NET.
I am worring about timing attacks against the ECC key exchange scheme. Is BouncyCastle prone to timing attacks? Is there a way to use it to i... |
Does BouncyCastle (for ECC) resist timing attacks? |
Time-locked encryption and time-released encryption seem to be security systems focused on making sure that the decryption of certain message cannot take place **before** a certain time has passed.
However, I was wondering if there's in cryptography something aiming at the opposite of the above, so I would like to m... |
This is the sequel of my previous question about AES block cipher modes of operation (See: http://crypto.stackexchange.com/questions/10858)
Now, here is my real problem. I have to use a block cipher with 8 bit input block size. As you say, i think that every clock cycle i receive 128 bits of information. With the 8 ... |
This is the sequel to my previous question about AES block cipher modes of operation.
<br>
(See: http://crypto.stackexchange.com/questions/10858)
Now, here is my real problem. I have to use a block cipher with 8 bit input block size. As you say, I think that every clock cycle I receive 128 bits of information. Wit... |
How does one use AES block cipher modes of operation? |
Is automated security protocol verification tool as convictive as written security analysis? |
Ecording [RFC 4346](http://tools.ietf.org/html/rfc4346#page-79)
> Explicit IVs
> [CBCATT] describes a chosen plaintext attack on TLS that depends on
knowing the IV for a record. Previous versions of TLS [TLS1.0] used
the CBC residue of the previous record as the IV and therefore
enabled this a... |
How TLS 1.1 and 1.2 generate IV (initialization vector) for each Records? |
In *game-based security definitions*, like for example the one defining IND-CPA security, a given cryptosystem is said to be *secure* if any probabilistic polynomial time adversary has only a negligible advantage of winning the game, where the advantage is defined to be
$|Pr[b^{\prime}=b] - \frac{1}{2}|$,
being... |
Does redundancy in a file or data effect performance and security of encryption? (for example for AES, if not for general case)
Is it easier to encrypt something that has high redundancy or something that has almost no redundancy?
And does redundancy makes security weaker by any means? |
How does redundancy in a file effects performance and security of encryption? |
According to [RFC 4346](http://tools.ietf.org/html/rfc4346#page-79)
> Explicit IVs
> [CBCATT] describes a chosen plaintext attack on TLS that depends on
knowing the IV for a record. Previous versions of TLS [TLS1.0] used
the CBC residue of the previous record as the IV and therefore
enabled th... |
How do TLS 1.1 and 1.2 generate IVs (initialization vectors) for each record? |
I am not well versed in the field but I believe I know the basics.
All encryption algorithms that I know of utilize direct data manipulation to encrypt a message (string of bits) such as shifting, cycling, etc. in specific patterns utilizing the encryption key.
Is there any algorithm that instead of touching the ... |
I have a file containing 16-bit samples and I want to encrypt it, but the problem is that I need to be able to read any random 16-bit value from the file, and be to able to decrypt it, without reading larger (or surrounding) blocks. Because else it would require huge modifications to the device and driver.
It doesnt... |
Which encryption method supports random reads? |
I read many papers on authenticated key exchange protocols. Most securitys proof are done by the authors. In this method, you can imagine that the efficiency is low. Moreover, even if you have proven a AKE protocol's security under a certain model (say [eCK][1]), you still cannot ensure the security to be 100 percent. ... |
Is an automated security protocol verification tool as convictive as written security analysis? |
I am implementing in C++ the Scream stream cipher. The Scream family is composed of *Scream-0*, *Scream-S* and *Scream-F*. For this question, assume that I'm using *Scream-S*.
The specifications of the Scream cipher are given in the paper ["Scream: a software-efficient stream cipher"][1], but I didn't find a refere... |
I'm new to cryptography and have just encountered AES and SPN. I would like to know how the S-box, permutation step and MixColumn step help improve security. It seems to me (perhaps mistakenly) that the security is provided solely by the key and that the substitution, permutation and Mixcolumn steps are redundant.
... |
What is the intuition behind AES or SPN? |
I'm new to cryptography and have just encountered AES and SPN. I would like to know how the S-box, permutation step and the *MixColumn* step help improve security. It seems to me (perhaps mistakenly) that the security is provided solely by the key and that the substitution, permutation and *MixColumn* steps are redunda... |
AES file encryption with PBKDF2. Safe parameters? |
how much trust can we place in protocol verifiers? |
Few block cipher modes has additional parameter , tweaks , especially the ones that are format preserving .
Now the comments section of this [blog][1] entry says such tweaks can be used for BIN numbers, expiration dates etc of credit card numbers.
How can tweaks be used to enforce such checks ?
what other wa... |
what are the uses of tweaks in block ciphers? |
I'm trying to evaluate the correlation between key length and the number of messages that needs to be send to server during Cache timing Attack.
I red both
D. Bernstein, “Cache-timing attacks on AES,” April 2005. Department of Mathematics, Statistics, and Computer Science University of Illinois at Chicago.
Robert ... |
I am currently studying AES algorithm and writing a Code using Python.
I am trying to add 'Salt' into the user input password,
Here is what I am doing,
import hashlib
import os
password = "Sufiyan Ghori"
salt = os.urandom(32) # 32bytes * 8 = 256bits
# Adding the Password into the first 1... |
You cannot recover the password from the hash. That's not something that password hashes are designed for.
Passwords are used for authentication: a client attempts to prove its authenticity to a verifier by proving that it knows the password. The client knows the password and does not need to recalculate it. The ver... |
I am currently studying AES algorithm and writing a Code using Python.
I am trying to add 'Salt' into the user input password,
Here is what I am doing,
import hashlib
import os
password = "Sufiyan Ghori"
salt = os.urandom(32) # 32bytes * 8 = 256bits
# Adding the Password into the first 1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.