instruction stringlengths 15 30k |
|---|
Programs like KeyPass and 1Password store password database files encrypted by a single password. If someone knows the protecting password ("Vault Key"), they can read the entire database ("secrets").
Being part of a family, I sometimes share passwords with my wife and others for bank accounts or Netflix which we ma... |
In RSA algorithm, the modulus $n$ should be chosen based on the below condition
$2^{8(k-1)} \leqslant n < 2^{8k}$
Where $k$ is the byte length of the modulus $n$.
for this condition I want the proof with an example.
An example is required for the condition: $2^{8(k-1)} \leqslant n$
what is the significa... |
In RSA algorithm, the modulus $n$ should be chosen based on the below condition
$2^{8(k-1)} \leqslant n < 2^{8k}$
Where $k$ is the byte length of the modulus $n$.
for this condition I want the proof with an example.
An example is required for the condition: $2^{8(k-1)} \leqslant n$
what is the purpose o... |
I've been reading a bit about cryptographic protocols and I keep seeing the phrase "rewinding argument". I've been unable to find a good source that would explain what is meant by this. It seems like proofs that use this technique cause trouble against active adversaries? I would appreciate if someone would explain wha... |
I see a lot of research in very sophisticated side-channel attacks on crypto systems. Most (but definitely not all) seem to follow a trend, namely, the crypto system does something very dumb like decrypt any block given to it with no IV or nonce (so usually ECB mode).
That said, there have been practical attacks aga... |
How practical are side-channel attacks? |
How practical are side-channel attacks and how much of a concern are they? |
Related to this question: Is there any memory trade-off that helps such attack?
Obviously if the field size is very small (say 40 bits) it´s possible, but what if the field size is 160 bits long? or 256 bits?
|
Is there a method to break an EC curve for all key-pairs (Q,d) such that (Q=d*G) faster than breaking every single key-pair? |
(1) Where are you going to keep the key for those decades? That is the point of attack.
(2) Regardless the answer to 1, for such a small amount of data use a one time pad. However you planned to keep the key secure for the intervening decades, use it to keep the pad safe.
|
`So, when building a system which uses cryptography (be it public or symmetric key), how practical of a concern are such attacks?`
Any class of attacks becomes a *practical* concern the moment it starts to become attractive for an attacker with respect to other classes, and provided any successful attack brings rewa... |
A [recent proof][1] of the [ABC Conjecture][2] has been released by one Shinichi Mochizuki. Now, I'm not well versed in mathematics but it would appear that this proof implies that finding prime factors could be greatly reduced in computation time. Is that right? Does this show that encryption that relies on prime f... |
> So, when building a system which uses cryptography (be it public or symmetric key), how practical of a concern are such attacks?
Any class of attacks becomes a *practical* concern the moment it starts to become attractive for an attacker with respect to other classes, and provided any successful attack brings rewa... |
I was just studying the Playfair cipher and from what I've understood, it is just a slightly better version of a Caesar cipher, in that it isn't actually mono-alphabetic but rather the 'digrams' are mono-alphabetic. I believe that since it offers a larger combination i.e 26*26=676 digrams, it is better than a Caesar Ci... |
How many keys does the Playfair Cipher have? |
> So, when building a system which uses cryptography (be it public or symmetric key), how practical of a concern are such attacks?
Any class of attacks becomes a *practical* concern the moment it starts to become attractive for an attacker with respect to other classes, and provided any successful attack brings rewa... |
I want to ask some questions about the [PBKDF2](https://en.wikipedia.org/wiki/PBKDF2) function and generally about the password-based derivation functions.
Actually we use the derivation function together with the salt to provide resistance against the dictionary attacks, right? One example is the UNIX encryption sc... |
I found responses provided by [Stephen Harris][1] and [PBKDF2 Answers](http://crypto.stackexchange.com/a/3498/2693) very useful. I just wanted to add my two cents on authenticated encryption and verification of the ciphertext without actually decrypting it.
In [PBKDF2 Answers' response][2] computing HMAC prior to ... |
I need to implement an AES encryption for firmware distribution system.
I have a bootloader that can decrypt various AES variants (ECB,CBC,CTR).
When I approached this I found few issues that aren't clear to me.
1. First, there's the IV vector, which is strange to me,
This vector has to be known to the encrypto... |
1. Yes, the IV (not "IV vector" because IV = "initialization vector" :p) is public and is only used to introduce randomness in the encryption process to prevent it being fully deterministic, while still preserving entropy in the key material.
2. You normally send the IV along with the ciphertext (yes, it is safe if ... |
i try to find out the structure of encrypted office files (i'd like to implement something like a carving tool for finding certain encrypted file types). I try to understand the Office Document Cryptography Structure Specification (http://msdn.microsoft.com/en-us/library/cc313071(v=office.12).aspx) but this seems to be... |
I found responses provided by [Stephen Harris][1] and [PBKDF2 Answers](http://crypto.stackexchange.com/a/3498/2693) very useful. I just wanted to add my two cents on authenticated encryption and verification of the ciphertext without actually decrypting it.
In [PBKDF2 Answers' response][2] computing HMAC prior to ... |
I found responses provided by [Stephen Harris][1] and [PBKDF2 Answers](http://crypto.stackexchange.com/a/3498/2693) very useful. I just wanted to add my two cents on authenticated encryption and verification of the ciphertext without actually decrypting it.
In [PBKDF2 Answers' response][2] computing HMAC prior to ... |
For example, in RSA, we use this for encryption: $ciphertext = (m^e \mod n)$ and for decryption.
If our message is `"hello world"`, then what number do we have to put as $m$ in the RSA formula? |
How do ciphers change plaintext into numeric digits for computing? |
I try to find out the structure of encrypted office files (I'd like to implement something like a carving tool for finding certain encrypted file types). I try to understand the [Office Document Cryptography Structure Specification](http://msdn.microsoft.com/en-us/library/cc313071(v=office.12).aspx) but this seems to b... |
Like in title: which one of these encryption methods (ZipCrypto, AES-256) is more secure and why? I am asking about it because I'd like to know which should be preferred when compressing files with Zip. |
What is safer: ZipCrypto or AES-256? |
According to [7-Zip][1],
>Use ZipCrypto, if you want to get archive compatible with most of the ZIP archivers. AES-256 provides stronger encryption, but now AES-256 is supported only by 7-Zip, WinZip and some other ZIP archivers.
So really there is some balance to be played with. Do you require better security a... |
WEP used a stream cipher. Stream ciphers are used to take a relatively short key and generate a seemingly endless supply of random data which can be XORed with the plaintext to generate the ciphertext.
That said, it is not really an endless supply of random data ([see this Crypto.SE question][1]), so, periodic reke... |
I'm going to encrypt the character 'Zhu', and decrypt it using RSA, I'm using the public key{e, n}, and private key{d, n}, the value of e,d,p I get from my test book, e = 17, d =53,n = 77(it works fine when the number is smaller than 76), but in my example below, it doesn't work
z = 90
h = 104
u = 107
e ... |
Why RSA can't do the number above 76? |
By definition you cannot encrypt values greater than the modulus in RSA, because the plaintext is immediately reduced modulo $n$ which loses information. This is because textbook RSA works in the $\mathbb{Z}/n\mathbb{Z}$ congruence ring, so from RSA's point of view, as long as two values have the same remainder modulo ... |
By definition you cannot encrypt values greater than the modulus in RSA, because the plaintext is immediately reduced modulo $n$ which loses information. This is because textbook RSA works in the $\mathbb{Z}/n\mathbb{Z}$ congruence ring, so from RSA's point of view, as long as two values have the same remainder modulo ... |
I'm going to encrypt the characters `Zhu`, and decrypt them using RSA. I'm using the public key $\{e, n\}$ and private key $\{d, n\}$. The values of $e$, $d$ and $p$ I get from my textbook: $e = 17$, $d = 53$, $n = 77$.
It works fine when the number is smaller than 76, but in my example below, it doesn't work:
... |
Why RSA can't handle numbers above 76? |
So I'm implementing ECDH key exchange in C# using the BouncyCastle library and I'm having a hard time understanding the eliptic curve side (FpCurve).
FpCurve curve = new FpCurve(
new BigInteger("883423532389192164791648750360308885314476597252960362792450860609699839"), // q
... |
I'm implementing ECDH key exchange in C# using the BouncyCastle library and I'm having a hard time understanding the elliptic curve side (`FpCurve`).
FpCurve curve = new FpCurve(
new BigInteger("883423532389192164791648750360308885314476597252960362792450860609699839"), // q
new BigInteger("7f... |
I am assuming you are throughly familiar with traditional [Diffie-Hellman][1]. If not, read up on it first.
For our purposes here, an elliptic curve is a curve whose points satisfy the equation $y^2=x^3+ax+b$. That right there tells you what $a$ and $b$ are, they are coefficients of the curve.
In elliptic curve ... |
I am assuming you are throughly familiar with traditional [Diffie-Hellman][1]. If not, read up on it first.
For our purposes here, an elliptic curve is a curve whose points satisfy the equation $y^2=x^3+ax+b$. That right there tells you what $a$ and $b$ are, they are coefficients of the curve.
In elliptic curve ... |
Your Coursera professor was wrong. Or, maybe you misunderstood him/her. (Hey, it happens sometimes. Nobody's perfect.)
WEP has many, *many* problems. The worst flaw -- and the best-known flaw -- relates to how WEP (mis)uses the IV with RC4. However, this is not the only flaw in WEP. Your professor's suggestion... |
What is a "rewinding argument"? |
I've long been looking for a symmetric encryption scheme (or algorithm) with equivalent keys. Let me define what I want:
1. Symmetric encryption algorithm with encryption function $E_k$ and inverse decryption function $D_k$.
2. Existence of equivalent keys. Keys $k_i \neq k_j$ will be called equivalent if $E_{... |
Encryption scheme with equivalent keys? |
I've long been looking for a symmetric encryption scheme (or algorithm) with equivalent keys. Let me define what I want:
1. Symmetric encryption algorithm with encryption function $E_k$ and inverse decryption function $D_k$.
2. Existence of equivalent keys. Keys $k_i \neq k_j$ will be called equivalent if $E_{... |
I don't know of any scheme that provides this, and it sounds tricky to build one.
Here's the closest I can come up with. Let $n=pq$ be a 2048-bit RSA modulus, $d$ be a random 2048-bit number that is relatively prime to $(p-1)(q-1)$, and $e = d^{-1} \bmod n$. The master secret is $d$; $n$ will be baked into the des... |
I don't know of any scheme that provides this, and it sounds tricky to build one.
Here's the closest I can come up with. Let $n=pq$ be a 2048-bit RSA modulus, $d$ be a random 2048-bit number that is relatively prime to $(p-1)(q-1)$, and $e = d^{-1} \bmod (p-1)(q-1)$. The master secret is $d$; $n$ will be baked int... |
Order-preserving encryption (OPE) is, apparently, a method of encrypting data so that it's possible to make efficient inequality comparisons on the encrypted items without decrypting them.
I've been coming across this term in various places (including [here](http://crypto.stackexchange.com/questions/3553/how-to-impl... |
How does order-preserving encryption work? |
I've been reading Modern Crypto by Katz and Lindell as an intro to crypto. The book seems to use the term ''simulator'' when it talks about a game like, for instance, how it defines CPA-security as an interaction between an algorithm and a simulator.
Having looked at some crypto papers, it seems like these definitio... |
Simulation-based security? |
Rewinding is used in all sorts of interactive protocols, but it's perhaps easiest to understand it for a zero-knowledge property.
In proving zero-knowledge, we consider a cheating verifier interacting with an honest prover. The prover knows something that the verifier doesn't (say, the factorization of an RSA modulu... |
A Playfair key consists of the alphabet (reduced to 25 letters) spread on a 5x5 square. The rules of Playfair are such that any rotation of the lines, and any rotation of the columns, lead to an equivalent key. Unless I err, there are no other equivalent keys.
I conclude Playfair has $25!/{5^2}=620448401733239439360... |
A Playfair key consists of the alphabet (reduced to 25 letters) spread on a 5x5 square. The rules of Playfair are such that any rotation of the lines, and any rotation of the columns, lead to an equivalent key. Unless I err, there are no other equivalent keys.
I conclude Playfair has $25!/{5^2}=620448401733239439360... |
A Playfair key consists of the alphabet (reduced to 25 letters) spread on a 5x5 square. The rules of Playfair are such that any rotation of the lines, and any rotation of the columns, lead to an equivalent key. Unless I err, there are no other equivalent keys.
I conclude Playfair has $25!/{5^2}=620448401733239439360... |
Your second question was about programmability. This hasn't been directly addressed yet by [Thomas' answer](http://crypto.stackexchange.com/a/1410) or the comments, so I'll focus on that question only. Unfortunately I don't know of a simple primitive that is secure in the random oracle model that requires programmabili... |
For some curves it's necessary to validate the public key of the other side before running an elliptic-curve Diffie-Hellman key-exchange. Apparently if you don't validate the public key, small subgroup attacks can leak your private key.
I have a few questions related to this issue:
1. Why can these attacks accumu... |
Why do public keys need to be validated? |
The third-party Apache plugin mod_auth_tkt uses a tragically-not-HMAC construction:
digest0 = hash(
encode_ip_timestamp(ip, timestamp) + secret + userid + '\0'
+ tokens + '\0' + user_data).hexdigest()
digest = hash(digest0 + secret).hexdigest()
How bad is it? Clearly the performance is ... |
Is the mod_auth_tkt scheme secure? |
At a glance, I see no obvious weaknesses. Obviously, the security proof of HMAC won't apply to this construction, but that doesn't necessarily make it insecure — it just means that we can't _prove_ its security (given appropriate assumptions on the underlying hash function), or at least that we'll need different... |
For some curves it's necessary to validate the public-key of the other side before running an elliptic-curve Diffie-Hellman key-exchange. Apparently if you don't validate the public key, small subgroup attacks can leak your private key.
I have a few questions related to this issue:
1. Why can these attacks accumu... |
I was just studying the Playfair cipher and from what I've understood, it is just a slightly better version of a Caesar cipher, in that it isn't actually mono-alphabetic but rather the 'digrams' are mono-alphabetic. I believe that since it offers a larger combination i.e 26*26=676 digrams, it is better than a Caesar Ci... |
Consider the situation of a nation state (Blue) at war with another nation state (Red). Blue wants to deploy a secure cipher that blue currently can not break, but they are considered that Red could reverse engineer the cipher and use it to secure Red's communication (Red is unable to develop it's own secure cipher).
... |
A [Playfair][1] key consists of the alphabet (reduced to 25 letters) spread on a 5x5 square. The rules of Playfair are such that any rotation of the lines, and any rotation of the columns, lead to an equivalent key. A transposition of line/columns leads to a key such that 225 digrams out 625 are mapped identically to t... |
A [Playfair][1] key consists of the alphabet (reduced to 25 letters) spread on a 5x5 square. The rules of Playfair are such that any rotation of the lines, and any rotation of the columns, lead to an equivalent key. A transposition of line/columns leads to a key such that 225 digrams out of 625 are mapped identically t... |
When we consider that a [Playfair][1] key consists of the alphabet (reduced to 25 letters) spread on a 5x5 square, that's $25!$ keys (another formulation consider any string to be a key; then strings leading to the same square are obviously equivalent keys).
The rules of Playfair are such that any rotation of the li... |
If I know
H = md5( SECRET_KEY | DATA )
then I can calculate
H' = md5( SECRET_KEY | DATA | DATA' )
That's length-extension attack. But is the opposite possible, e.g. if I know
H = md5( SECRET_KEY | DATA )
can I find
H'' = md5( SECRET_KEY )
where DATA is known and lenght of DATA is... |
md5: is reverse length-extension attack possible? |
When we consider that a [Playfair][1] key consists of the alphabet (reduced to 25 letters) spread on a 5x5 square, that's $25!$ keys (another formulation consider any string to be a key; then strings leading to the same square are equivalent keys).
The rules of Playfair are such that any rotation of the lines in the... |
If I know
H = md5( SECRET_KEY | DATA )
then I can calculate
H' = md5( SECRET_KEY | DATA | DATA' )
That's length-extension attack. But is the opposite possible? E.g. if I know
H = md5( SECRET_KEY | DATA )
can I find
H'' = md5( SECRET_KEY )
where DATA is known and lenght of DATA is... |
When we consider that a [Playfair][1] key consists of the alphabet (reduced to 25 letters) spread on a 5x5 square, that's $25!$ keys (another formulation consider any string to be a key; then strings leading to the same square are equivalent keys).
The rules of Playfair are such that any rotation of the lines in the... |
I have to implement protocol of secure data transfer that can be described as
1. Alice selects data to send from finite set $m\in M$ (e.g. $M$ could be a column of values in database table)
2. Alice encrypts selected data with some **symmetric(!)** algorithm and sends it to Bob.
3. Bob decrypts data and get $m$... |
I know the plaintext (26 bytes long) and cryptotext of block cipher (suspected to be AES) in ECB mode. I can generate hundreds or thousands of such samples, but the samples are not arbitrary. What are my chances of recovering the crypto key using brute force methods or using brute-force + some crypto analysis?
Is th... |
When trying to break an unknown cipher, one first needs to figure out what kind of cipher one it is. Generally, a good starting point would be to start with the most common and well known [classical ciphers](http://en.wikipedia.org/wiki/Classical_cipher), eliminate those that obviously don't fit, and try the remaining... |
Before we get to the questions, we need to understand what these attacks look like.
An Elliptic Curve point is a pair of values $(x, y)$ that satisfies the equations $y^3 = x^2 + ax + b \bmod p$, and point addition is an operation that takes two such points $(x_1, y_1)$ and $(x_2, y_2)$, and computes a third point $... |
Before we get to the questions, we need to understand what these attacks look like.
An Elliptic Curve point is a pair of values $(x, y)$ that satisfies the equation $y^3 = x^2 + ax + b \bmod p$, and point addition is an operation that takes two such points $(x_1, y_1)$ and $(x_2, y_2)$, and computes a third point $(... |
Before we get to the questions, we need to understand what these attacks look like.
An Elliptic Curve point is a pair of values $(x, y)$ that satisfies the equation $y^2 = x^3 + ax + b \bmod p$, and point addition is an operation that takes two such points $(x_1, y_1)$ and $(x_2, y_2)$, and computes a third point $(... |
Depends what you mean by "validate". You should always validate any Public Key, as otherwise how do you know who owns it? If you are not sure of the owner, you are open to a man-in-the-middle attack.
But I guess by validate you mean validate that the point is of the right order? You should certainly check that its ... |
Suppose I have many instances of the discrete log problem, all using the same unknown exponent. Is this problem easier than the standard discrete log problem?
Oh, heck, I should be more precise. Let $p$ be a large prime, chosen to be large enough that the discrete log problem modulo $p$ is (presumably) hard. Ever... |
I can answer the question for the first of the three cases:
1. *Random choice.* In this case, seeing $n$ instances cannot help the adversary very much (not more than a $n$-fold speedup). The problem still remains hard, for suitably large $p$.
Justification: By a simple reduction. Suppose we had a clever algorit... |
Suppose I have a linear recurrence relation
$$a(n) = c_1 a(n-1) + \dots + c_k a(n-k) + d,$$
where the constants $c_1,\dots,c_k,d$ are given and the initial values $a(0),\dots,a(k-1)$ are given as well. Assume that all arithmetic is done over some finite field, say $GF(p)$ where $p$ is a large prime (i.e., everything... |
Let $p$ be a large prime; we will work in the multiplicative group modulo $p$. Let $A$ be a $n\times n$ matrix. Also, let $x$ be a $n$-vector and $k$ a positive integer.
Suppose we are given $p$, $A$, $x$, and $y$. The goal is to find a $k$ that satisfies $A^k x = y$. Is there an efficient algorithm that solves ... |
In reading about the One-time pad it appears to need truly random key for the pad. Since true random values are not practical to generate this presents a problem (thus making One-time pad less practical). If instead I use the operating system provided CSPRNG to generate the key, is that any better than using AES in GCM... |
Which is more secure using a CSPRNG for a One-time pad, or AES? |
If you use a CSPRNG to generate the pad, you're not using a one-time-pad anymore by definition since the pad is no longer random, so the question as stated is incorrect with respect to terminology.
The advantage of using stream ciphers is that you no longer have the key distribution problem the OTP has, since your k... |
If you use a CSPRNG to generate the pad, you're not using a one-time-pad anymore by definition since the pad is no longer random, so the question as stated is incorrect with respect to terminology.
The advantage of using stream ciphers is that you no longer have the key distribution problem the OTP has, since your k... |
First of all, a terminology nit: please don't say "a One-time-pad generated by a CSPRNG"; a one-time pad must, by definition, be generated randomly, and an important part of its security proof is that it was generated randomly (and so an attacker cannot disqualify any potential pad, even if that attacker had infinite c... |
i hope somebody can help me understand the design criterias for AES. Therefore I would be really thankful if somebody could explain "non-linearity" in this context.
A criteria for the s-box in AES is non-linearity, where the maximum input-output correlation amplitude must be as small as possible. why is a lookup tab... |
When we consider that a [Playfair][1] key consists of the alphabet (reduced to 25 letters) spread on a 5x5 square, that's $25!$ keys (another formulation consider any string to be a key; then strings leading to the same square are equivalent keys).
The rules of Playfair are such that any rotation of the lines in the... |
Is [RSASSA-PKCS1-v1_5](https://tools.ietf.org/html/rfc3447#section-8.2) a good signature scheme to recommend that people use in new systems? Is it believed to be secure and represent the state-of-the-art in RSA-based signatures?
I understand that [RSA-PSS](https://tools.ietf.org/html/rfc3447#section-8.1) is a newer... |
Is RSASSA-PKCS1-v1_5 a good signature scheme for new systems? |
PSS is harder to implement because it uses randomness -- randomness is hard on many embedded systems like smart cards.
The most proclaimed advantage of PSS is that it has a "security proof" with, apparently, a rather tight reduction (see [this page][1] for some references). Security proofs are not an easy subject; t... |
Is there any plot or visualizing program that can plot the distribution of a plaintext and then the distribution of the ciphertext after applying a ciphering encryption algorithm? I am interested from stream ciphers |
How to plot the distribution of a ciphertext? |
Does it make an encrypted string more secure if I use `SHA256` as Secret Key for `AES128` Algorithm? I do know that `SHA256` whatever the input still produces `64 characters` of hashed string.
Will it still be accepted in AES as a key or it will cut it off to `32 characters`?
Also is it true that each byte is equiv... |
I am working on a project that needs to securely authenticating one or more smartphone clients with server running on a microcontroller so it has very limited resources. I have found plenty of lightweight HMAC hashing libraries. Therefore it seems to me that an HOTP authentication mechanism would be feasible on the l... |
Is it considered insecure in an HOTP implementation to publicly provide the next counter? |
I am working on a project that needs to securely authenticating one or more smartphone clients with a server running on a microcontroller so it has very limited resources. I have found plenty of lightweight HMAC hashing libraries. Therefore it seems to me that an HOTP authentication mechanism would be feasible on the... |
In reading about the One-time pad it appears to need truly random key for the pad. Since true random values are not practical to generate this presents a problem (thus making One-time pad less practical). If instead I use the operating system provided CSPRNG to generate the key, is that any better than using AES in GCM... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.