instruction stringlengths 15 30k |
|---|
I was trying to understand cryptography from Information Security book by mark stamp and I am confused by something.
Suppose that Alice has a secure block cipher, but the cipher only uses
an 8-bit key. To make this cipher "more secure," Alice generates a
random 64-bit key K, and iterates the cipher eight times, th... |
Encrypting 8 times with 8-bit key beneficial? |
I was trying to understand cryptography from Information Security book by mark stamp and I am confused by something.
Suppose that Alice has a secure block cipher, but the cipher only uses
an 8-bit key. To make this cipher "more secure," Alice generates a
random 64-bit key K, and iterates the cipher eight times, th... |
I want to encrypt a truly random plaintext (a key file) based on a user password. I'll use PBKDF2-HMAC-SHA256 to generate an encryption key from the password, but I'm wondering if I even need to bother with AES or some other cipher: can I expect good security if I just use PBKDF2 to generate a key equal in length to th... |
AES and DES are block ciphers. Mathematically, its the mapping from plaintext space to ciphertext space using the keys i.e. $\{{0,1}\}^k$ x $\{{0,1}\}^l \longrightarrow \{{0,1}\}^l$
I know that these keys are randomized. What I want to know is how these are calculated in real world and is there any way to change these... |
Can they keys used in AES and DES block ciphers be modified? |
Can PBKDF2 be used to create an XOR cipher key to encrypt random plaintext? |
I was trying to understand cryptography from the book [Information Security](http://www.amazon.co.uk/Information-Security-Principles-Mark-Stamp/dp/0470626399) by Mark Stamp and I am confused by something.
>Suppose that Alice has a secure block cipher, but the cipher only uses
an 8-bit key. To make this cipher "more... |
AES and DES are block ciphers. Mathematically, its the mapping from plaintext space to ciphertext space using the keys i.e. $\{{0,1}\}^k$ x $\{{0,1}\}^l \longrightarrow \{{0,1}\}^l$
I know that these keys are random. What I want to know is how these are calculated in real world and is there any way to change these k... |
How to choose keys for a block cipher? |
I have an audience of senior (non-technical) executives and senior technical people who are taking the backdoor in Dual_EC_DRBG and considering it as a weakness of Elliptic curves in general. I can take a max of about 10 mins in my presentation to address this issue - no more.
1. How can I intuitively explain the we... |
Explaining weakness of Dual EC DRBG to wider audience? |
I have constructed a stream cipher from a secure hash algorithm and a HMAC. Here is a brief description of the algorithm:
Let: (Actually Objective-C styled pseudo code)
* `[data SHA512Hash]`: SHA-512 hash of `data`,
* `[data SHA512HMAC:key]`: SHA-512 HMAC of `data` with `key`,
* `[data xor:another]`: bitwise XO... |
Can I construct a feasible stream cipher out of HMAC and a secure hash algorithm? |
I have constructed a stream cipher from a secure hash algorithm and a HMAC. Here is a brief description of the algorithm:
Let: (Actually Objective-C styled pseudo code)
* `[data SHA512Hash]`: SHA-512 hash of `data`,
* `[data SHA512HMAC:key]`: SHA-512 HMAC of `data` with `key`,
* `[data xor:another]`: bitwise XO... |
I have constructed a stream cipher from a secure hash algorithm and a HMAC. Here is a brief description of the algorithm:
Let: (Actually Objective-C styled pseudo code)
* `[data SHA512Hash]`: SHA-512 hash of `data`,
* `[data SHA512HMAC:key]`: SHA-512 HMAC of `data` with `key`,
* `[data xor:another]`: bitwise XO... |
For clarity, we can rewrite this scheme as a keystream `S` generated by `S[i] = HMAC-SHA512(K, S[i-1])`, for a key `K` and with the initialization that `S[0] = iv` (the used keystream starts at `S[1]`). Basically, iteratively hash the last output to produce the keystream.
The choice of `IV` for the variable name is ... |
Here is your algorithm in formula form, which might be easier to understand for non-objective-C-experts:
Encryption:
* $P_1 || P_2 || \dots || P_n := P$ (split plaintext in blocks, same size as hash output, except the last one)
* $K := SHA256(key)$
* $O_0 := IV (= K)$
* $O_i := HMAC_{SHA256}(K, O_{i-1})$ for a... |
In a recent [essay][1], Bruce Schneier tasks the engineering community with redesigning and rebuilding the vulnerable parts of the Internet's backbone.
> We need to figure out how to re-engineer the Internet to prevent this kind of wholesale spying. We need new techniques to prevent communications intermediaries fr... |
Can we design a public-key infrastructure without certificate authorities? |
For clarity, we can rewrite this scheme as a keystream `S` generated by `S[i] = HMAC-SHA512(K, S[i-1])`, for a key `K` and with the initialization that `S[0] = iv` (the used keystream starts at `S[1]`). Basically, iteratively hash the last output to produce the keystream.
The choice of `IV` for the variable name is ... |
I am very new to cryptography (so be kind), but I have a question that may seem silly.
If the one-time pad is the perfect cipher and impossible to crack, why would the following algorithm not be one of the strongest:
To encrypt
- generate a random bit array using a pseudo number generator with the key as the ... |
I have an audience of senior (non-technical) executives and senior technical people who are taking the backdoor in Dual_EC_DRBG and considering it as a weakness of Elliptic curves in general. I can take a max of about 10 mins in my presentation to address this issue - no more.
1. How can I explain the weakness in th... |
In [this paper][1] the term "simultaneously hardcore" is defined to be:
"We say that a block of bits of x are simultaneously hard-core for a one-way function f(x), if given f(x) they cannot be distinguished from a random string of the same length."
Could somebody give me an example of something that is simul... |
What does it mean to be simultaenously hardcore? |
In [this paper][1] the term "simultaneously hardcore" is defined to be:
"We say that a block of bits of x are simultaneously hard-core for a one-way function f(x),
if given f(x) they cannot be distinguished from a random string of the same length."
Could somebody give me an example of something that is ... |
I'm trying to design an extension to Shamir's Secret Sharing that would allow the participant to specify a password instead of remembering/storing a large integer or binary data. So far, I have two ideas, both based on some PBKDF:
- Run the password through a strong PBKDF to make $k_i$ then publish $(i, f(i)⊕ k_i)$... |
Given a message $M$ and a 256 bit key $K$, perform HMAC($K$, $M$) with a 256 bit hash function resulting in:
$a$ = `9a58e0eef2effc968d27cd61c47394867ceae43c7a877d59938f8400fe1a0204`
Now take every second hexadecimal symbol resulting in a 128 bit hash:
$b$ = `a80e2fc6d7d14346ca4ca7d93f40ea24`
Assume the atta... |
Is it possible to find a preimage for a reduced size hash? |
I have constructed a stream cipher from a secure hash algorithm and a HMAC. Here is a brief description of the algorithm:
Let: (Actually Objective-C styled pseudo code)
* `[data SHA512Hash]`: SHA-512 hash of `data`,
* `[data SHA512HMAC:key]`: SHA-512 HMAC of `data` with `key`,
* `[data xor:another]`: bitwise XO... |
Given a message $M$ and a 256 bit key $K$, perform HMAC($K$, $M$) with a 256 bit hash function resulting in:
$a$ = `9a58e0eef2effc968d27cd61c47394867ceae43c7a877d59938f8400fe1a0204`
Now take every second hexadecimal symbol resulting in a 128 bit hash:
$b$ = `a80e2fc6d7d14346ca4ca7d93f40ea24`
Assume the atta... |
In [this paper][1] the term "simultaneously hardcore" is defined as:
> "We say that a block of bits of $x$ are _simultaneously hard-core_ for a one-way function $f(x)$, if given $f(x)$ they cannot be distinguished from a random string of the same length."
Could somebody give me an example of something that is si... |
What does it mean to be simultaneously hardcore? |
I have constructed a stream cipher from a secure hash algorithm and a HMAC. Here is a brief description of the algorithm:
Let: (Actually Objective-C styled pseudo code)
* `[data SHA512Hash]`: SHA-512 hash of `data`,
* `[data SHA512HMAC:key]`: SHA-512 HMAC of `data` with `key`,
* `[data xor:another]`: bitwise XO... |
I've just started a [cryptography course][1]. I am beginning to understand the concepts (I'm only in week 2) but I just can't get my head around the theories and principles when written as equations.
I've been posed the below question to answer:
> Consider a very simple symmetric block encryption algorithm in ... |
From what I understand from your question, you are describing a stream cipher.
> If the one-time pad is the perfect cipher and impossible to crack, why would the following algorithm not be one of the strongest ...
You're on the right track; a one-time pad is essentially a perfect (unbreakable) stream cipher.
... |
From what I understand from your question, you are describing a [stream cipher][1].
> If the one-time pad is the perfect cipher and impossible to crack, why would the following algorithm not be one of the strongest ...
You're on the right track; a one-time pad is essentially a perfect (unbreakable) stream cipher... |
Disclaimer: I was looking for a place to ask this question on SE and this site seems to be the most fitting. If this question doesn't belong here, feel free to redirect me.<br>
<br>
Just out of boredom and curiosity, I've started to develop my own secret notation alphabet (for manual use, no computers involved). It's... |
How would I make a secret notation alphabet more secure? |
There was a [post](http://security.stackexchange.com/questions/42409/are-self-signed-certificates-actually-more-secure-than-ca-signed-certificates-no) on security.stackexchange last week about this. SSL/TLS with Certificate Authorities for all intents and purposes is now completely insecure from governments and any org... |
A Michael Kjörling notes, what you basically have is a [monographic substitution cipher](https://en.wikipedia.org/wiki/Substitution_cipher#Simple_substitution). These are generally easy to crack using [frequence analysis](https://en.wikipedia.org/wiki/Frequency_analysis); for example, if we know that the underlying te... |
This is indeed a good question; let me try to make it a bit more precise. Suppose:
* Alice has a plaintext message of some number of bits, call it p.
* Alice and Bob share a crypto-strength random number generator that generates n truly random bits.
* Alice and Bob share a pseudo-random number generator that can t... |
My intuition says yes but I'm not exactly sure, if an injective function is a secure PRP, is it's inverse a secure PRP as well?
Or in less technical terms, is it generally safe to swap the encryption/decryption functions of a blockcipher such as AES? |
If an injective function is a secure PRP, is it's inverse a secure PRP as well? |
A Michael Kjörling notes, what you basically have is a [monographic substitution cipher](https://en.wikipedia.org/wiki/Substitution_cipher#Simple_substitution). These are generally easy to crack using [frequence analysis](https://en.wikipedia.org/wiki/Frequency_analysis); for example, if we know that the underlying te... |
In order to generate multiple session keys from a Diffie Hellman key agreement protocol I'm trying to use the HKDF to generate this session keys. The HKDF algorithm uses an Extraction-Expand procedure. In the extraction proceduere it takes as an input a salt and a source key (in my case it will be the diffie hellman ge... |
In order to generate multiple session keys from a Diffie Hellman key agreement protocol, I'm trying to use the HKDF to generate this session keys. The HKDF algorithm uses an Extraction-Expand procedure. In the extraction procedure, it takes as an input a salt and a source key (in my case it will be the Diffie Hellman g... |
This is indeed a good question; let me try to make it a bit more precise. Suppose:
* Alice has a plaintext message of some number of bits, call it p.
* Alice and Bob share a crypto-strength random number generator that generates n truly random bits.
* Alice and Bob share a pseudo-random number generator that can t... |
**In theory.** No. The inverse of a secure PRP need not be a secure PRP.
Here is what we *can* guarantee. The inverse of a secure sPRP (strong-pseudo random permutation) is guaranteed to be a secure sPRP. Any secure sPRP is a secure PRP. Therefore, the inverse of a secure sPRP will be a secure PRP.
FYI, if yo... |
If a block cipher is a secure PRP, is it's inverse a secure PRP as well? My intuition says yes but I'm not exactly sure. |
Is the inverse of a secure PRP, also a secure PRP? |
**In theory.** No. The inverse of a secure PRP need not be a secure PRP.
Here is what we *can* guarantee. The inverse of a secure sPRP (strong-pseudo random permutation) is guaranteed to be a secure sPRP. Any secure sPRP is a secure PRP. Therefore, the inverse of a secure sPRP will be a secure PRP.
FYI, if yo... |
**In theory.** No. The inverse of a secure PRP need not be a secure PRP.
Here is what we *can* guarantee. The inverse of a secure sPRP (strong-pseudo random permutation) is guaranteed to be a secure sPRP. Any secure sPRP is a secure PRP. Therefore, the inverse of a secure sPRP will be a secure PRP.
FYI, if yo... |
If a block cipher is a secure PRP, is it's inverse a secure PRP as well? My intuition says yes but I'm not exactly sure.
On a related note, if a block cipher is a secure sPRP, is it's inverse a secure sPRP?
I'm using the terminology "PRP = secure against chosen-plaintext attacks", "sPRP = strong PRP = secure aga... |
**Disclaimer:** I was looking for a place to ask this question on SE and this site seems to be the most fitting. If this question doesn't belong here, feel free to redirect me.
Just out of boredom and curiosity, I've started to develop my own secret notation alphabet (for manual use, no computers involved). It's bas... |
I'm trying to write a cloud storage application where everything the user uploads is unreadable by the server, encrypted client-side before being sent.
Currently, the flow looks like this:
- User inputs password
- Password is salted and a 256-bit SHA-3 hash is taken
- A new true-random key is generated
- The p... |
What's the most secure way to derive a key from a password repeatably? |
Is there a hash function which has no collisions?
To clarify: it would be some function which would produce variable-length output, and never produce the same output for differing input. It would also be computationally hard to derive the input from the output. |
[Wikipedia says](http://en.wikipedia.org/wiki/Elliptic_curve_cryptography#NIST-recommended_elliptic_curves) in reference to the elliptic curves officially recommended by NIST in [FIPS 186-3](https://www.google.com/search?q=FIPS+186-3):
> Five prime fields for certain primes p of sizes 192, 224, 256, 384, and 521 bit... |
I do not have any hard data to back this up, but an educated guess is that relaxing the cofactor to be *"small"* instead of *"1"* was done to allow Koblitz curves — which in early days looked like an attractive choice for implementation.
[Koblitz curves][1] over binary fields are of the form $y^2 + xy = x^3 + a x^2... |
So with blind signatures you have two parties - A and B. A has a message that they want B to sign so A creates a hash of their message, blinds it, and then sends it to B to sign. That, as I understand is how blind signatures work.
My question is... what's the point of blinding, in that step? If all you're sending i... |
There was a [post](http://security.stackexchange.com/questions/42409/are-self-signed-certificates-actually-more-secure-than-ca-signed-certificates-no) on security.stackexchange last week about this. SSL/TLS with Certificate Authorities for all intents and purposes is now completely insecure from governments and any org... |
Consider this command on a trusted computer: `result = function(public data, secret data)` or `r = f(p,s)` for short.
How could a function on an untrusted computer produce the same `result` without the `secret data` being available to the untrusted computer?
*Abstract example:* `r = f(p, s) = f'(p1, p2, ... pn)` ... |
How to get the same calculation result on an untrusted computer, while withholding some information? |
As far as I know, SSH2 first does a key exchange based on the server host key and brings up transport authentication and encryption derived from this kex. The real authentication (password or public key) is done over this secure transport.
If you set the cipher to 'none', you wouldn't want to allow password authenti... |
What mathematical fields of knowledge would be required in order to get a good understanding of encryption algorithms? Is it basic algebra, or is there a "higher education" mathematical field dedicated to encryption? I know there is the cryptography field, but what is the subset of knowledge required for cryptographers... |
What is the lowest level of mathematics required in order to understand how encryption algorithms work? |
Taken from http://en.wikipedia.org/wiki/Homomorphic_encryption,
$$
\mathcal{E}(x_1) \cdot \mathcal{E}(x_2) = x_1^e x_2^e
$$
$$
\;\bmod\; m = (x_1x_2)^e \;
$$
$$
\bmod\; m = \mathcal{E}(x_1 \cdot x_2)
$$
What is the superscript 'e' representing in the first expression?
How do we get from the second line... |
How does this explaination of unpadded RSA work? |
How does this explanation of unpadded RSA work? |
I have recently started looking into creating secure, while not validating against an external server, software product keys.
The idea I have had is to create a key consisting of two parts firstly a section that contains some (but not all) details of the user; for example name, customer ID and maybe a salt this woul... |
Taken from http://en.wikipedia.org/wiki/Homomorphic_encryption,
$\mathcal{E}(x_1) \cdot \mathcal{E}(x_2) = x_1^e x_2^e$
$\bmod\; m = (x_1x_2)^e \;$
$\bmod\; m = \mathcal{E}(x_1 \cdot x_2)$
What is the superscript $^e$ representing in the first expression, and how do we get from the second line, to the thir... |
Can someone explain how this unpadded RSA formula works? |
**Consider this command on a trusted computer:**
`result = function(public data, secret data)`
or shorter: `r = f(p,s)`.
How could a function on an untrusted computer produce the same `result` without the `secret data` being available to the untrusted computer?
**Abstract example:**
`r = f(p, s) = f'(p1,... |
This is a very basic question. If there is a duplicate, sorry, I couldn't find it.
The security of RSA is based on the integer factorization problem, which is a very well defined and understood mathematical problem. This problem must be solved in order to fundamentally break RSA.
What about AES (and others based ... |
Why AES is considered secure? |
The security of RSA is based on the integer factorization problem, which is a very well defined and understood mathematical problem. This problem must be solved in order to fundamentally break RSA.
What about AES (and others based on the same idea)?
Why is it difficult to break?
Is there any mathematical prin... |
Why is AES considered to be secure? |
A fun book to start with for the number theory side of things:
http://www.amazon.com/Friendly-Introduction-Number-Theory-4th/dp/0321816196/ref=sr_1_2?ie=UTF8&qid=1326998078&sr=8-2
It's pretty accessible for the mathematically inclined but for whatever reason didn't get the grounding they should have in college.
... |
Padding: any security concern? |
I've read a few papers recently that used a notion of security called "indistinguishability from random bits/strings" under chosen plaintext attack, also called IND\$-CPA. See e.g. <http://pdf.aminer.org/000/217/279/nonce_based_symmetric_encryption.pdf>. The authenticated encryption mode "OCB" is also proved using th... |
Proof that IND$-CPA implies IND-CPA? |
I was looking all over the Internet list of ALL existing symmetric and asymmetric ciphers.
I know that there's, for example, AES, DES, Blowfish, DSA. But how about more? Where to find such list? |
So, as we all know, [Dual_EC_DRBG contains an NSA back door][1]. At this point, there is no reason to call it a "potential" or even an "alleged" back door; the presence is [obvious even to the NY Times][2].
As we also know, RSA BSAFE has been using Dual_EC_DRBG by default, with a [justification so stupid][3] it can ... |
Does Microsoft use Dual_EC_DRBG by default? |
Following are steps to conduct Chosen Plaintext Attack (CPA) indistinguishibility experiment $PrivK_\mathcal{A,E}^{eav}(n)$.
$\mathcal{A}$ is the adversary $\mathcal{E}$ is the encryption scheme (Gen, Enc, Dec), $n$ is the length of the input.
1. a secret key SK is generated using Gen($1^n)$
2. $\mathcal{A}$ i... |
Is my understanding of CPA indinguishibility experiment correct? |
On [pg. 11 Definition 2][1] it outlines the following steps
1. (PK,SK) public key and secret key are generated by defender using Gen($1^n$)
2. adversary $A1$ generates $m_0$ and $m_1$ and a $state$ using PK
3. defender randomly selects $b$ and encrypts $m_b$ invoking $ENC_{PK}(m_b) = y$, and given to $A2$.
4. usi... |
What is "state" in an adaptive memory attack? |
There are a surprisingly large number of subtly different definitions of CPA indistinguishability. What you describe in points 1 through 5 is one that I have heard of, though at the end of your post you make it 'iterative', in the sense that $\mathcal{A}$ can play the game over and over with $\mathcal{E}$ using the sa... |
So, as we all know, [Dual_EC_DRBG contains an NSA back door][1]. At this point, there is no reason to call it a "potential" or even an "alleged" back door; the presence is [obvious even to the NY Times][2].
As we also know, RSA BSAFE has been using Dual_EC_DRBG by default, with a [justification so stupid][3] it can ... |
So, as we all know, [Dual_EC_DRBG contains an NSA back door][1]. At this point, there is no reason to call it a "potential" or even an "alleged" back door; the presence is [obvious even to the NY Times][2].
As we also know, RSA BSAFE has been using Dual_EC_DRBG by default, with a [justification so stupid][3] it can ... |
What makes adaptive memory attack difficult for the adversary? |
A [recent blog post](http://blog.ivanristic.com/2013/09/is-beast-still-a-threat.html) from Ivan Ristić (expert extraordinaire on all things SSL) says:
> all major browsers are susceptible to protocol downgrade attacks; an active MITM can simulate failure conditions and force all browsers to back off from attempting ... |
Why is TLS susceptible to protocol downgrade attacks? |
The wiki defines the decisional Diffie–Hellman assumption as follows:
#Decisional Diffie–Hellman assumption
Consider a (multiplicative) cyclic group $G$ of order $q$, and with generator $g$. The DDH assumption states that, given $g^a$ and $g^b$ for uniformly and independently chosen $a$,$b$ $\in \mathbb{Z}_q$, the va... |
The wiki defines the decisional Diffie–Hellman assumption as follows:
#Decisional Diffie–Hellman assumption
Consider a (multiplicative) cyclic group $G$ of order $q$, and with generator $g$. The DDH assumption states that, given $g^a$ and $g^b$ for uniformly and independently chosen $a$,$b$ $\in \mathbb{Z}_q$, the va... |
[Annex E.1 of RFC 5246][1] contains the following text which is a nice summary of the situation:
> Note: some server implementations are known to implement version
negotiation incorrectly. For example, there are buggy TLS 1.0
servers that simply close the connection when the client offers a
versi... |
The wiki defines the decisional Diffie–Hellman assumption as follows:
#Decisional Diffie–Hellman assumption
Consider a (multiplicative) cyclic group $G$ of order $q$, and with generator $g$. The DDH assumption states that, given $g^a$ and $g^b$ for uniformly and independently chosen $a$,$b$ $\in \mathbb{Z}_q$, the va... |
I've read a few papers recently that used a notion of security called "indistinguishability from random bits/strings" under chosen plaintext attack, also called IND\$-CPA. See e.g. <http://pdf.aminer.org/000/217/279/nonce_based_symmetric_encryption.pdf>. The authenticated encryption mode "OCB" is also proved using th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.