instruction stringlengths 15 30k |
|---|
how does google's authenticator number generator works? |
I am trying to understand the operation of the Dual_EC_DRBG. I'm reading the formal specification (SP 800-90) and can't seem to find a definition of the $\phi$ function used throughout the definition that I can grasp. The definition I found is on page 65 of [SP 800-90A][1]. Just to be clear, I'm referring to the $\ph... |
I am trying to understand the operation of the Dual_EC_DRBG. I'm reading the formal specification (SP 800-90) and can't seem to find a definition of the $\phi$ function used throughout the definition that I can grasp. The definition I found is on page 65 of [SP 800-90A][1]. Just to be clear, I'm referring to the $\ph... |
I currently am writing a web app and am using two random hashes that are before and after the string and are both 50 char long (alphabet, numbers, and special chars).
strlen($hash1) = 50;
strlen($has2) = 50;
$sha3pw = $hash1+$password+$hash2;
$sha3pw = sha3($sha3pw);
What are the chances that s... |
I currently am writing a web app and am using two random hashes that are before and after the string and are both 50 char long (alphabet, numbers, and special chars).
strlen($hash1) = 50;
strlen($hash2) = 50;
$sha3pw = sha3($hash1+$password+$hash2);
What are the chances that someone will be able to find... |
In RSA the sign operation in other words is encrypt with private key. It is safe to use the same keypair for encrypt/decrypt and sign/verify? |
I have taken elliptic curve y^2=x^3-4x+20 defined over F29.
generator of finite field (F29)=37
I took base point P=(1,5).
I got following result.
![enter image description here][1]
[1]: https://i.stack.imgur.com/qfzgF.png
How could I show the results graphically 1P,2P,..?
Is there any tool to show the... |
How to show Results graphically..? |
I think you meant to reply to my comment?
The point is the curve won't look like a curve when evaluated over a finite field, and there's no real way of visualising this.
If you were to evaluate $E(\mathbb{R})$ then the resulting points would form a curve in $\mathbb{R}^2$, which you could then [plot them](http://ww... |
The point is an elliptic curve doesn't actually look anything like a curve when evaluated over a finite field, and indeed there's no real way of visualising points in $\mathbb{F}_{29}\times\mathbb{F}_{29}$ that doesn't loose some of the structure anyway.
The best I can think of would be to plot them simple as points... |
I have taken elliptic curve $E\colon y^2=x^3-4x+20$, defined over $\mathbb{F}_{29}$.
The number of points on the curve, $\left|E(\mathbb{F}_{29})\right|=37$.
I took base point $P=(1,5)$, and got following results:
![Array of scalar multiples of point (1,5)][1]
I want the results graphically to know the behav... |
I am using a `AutoSeededRNG` from Crypto++ to generate IVs for use in CBC encryption.
I am encoding the IVs using Base64 for future use (decryption).
I notice that all the Base64 encoded IVs end with `gB`.
Why is this? Is it a security problem?
Here is the code:
for (int i = 0; i < 10; i++) {
... |
The RSA signature operation is basically the same as encrypting with the private key. In particular, both operations use the same kind of keys.
Is it safe to use the same RSA keypair both for encryption / decryption and for signing / verification? |
Suppose h1 is collision resistant, and h2 isn't.
Will h(x)=h2(h1(x)) always be collision resistant? |
Will they always be collision resistant? **No**.
For example, let $h_2(x)=0$. Then, $h(x)=h_2(h_1(x))=0$, which certainly isn't collision resistant.
*Can* it be collision resistant? **Yes**.
For example, suppose we define $h_1(x)= |
Will they always be collision resistant? **No**.
For example, let $h_2(x)=0$. Then, $h(x)=h_2(h_1(x))=0$, which certainly isn't collision resistant.
--------------------------
*Can* it be collision resistant? **Yes**.
For example, suppose we define $h_1(x)=\mathrm{SHA256}(x)$ and
$$
h_2(x)=\begin{cases}
... |
Suppose $h_1$ is collision resistant, and $h_2$ isn't.
Will $h(x)=h_2(h_1(x))$ always be collision resistant? |
Is the composition of collision resistant hash with non collision resistant hash a collision resistant hash? |
Suppose $h_1$ is collision resistant, and $h_2$ isn't.
Will $h(x)=h_2(h_1(x))$ always be collision resistant?
[Edited:] the output of h2 must be uniformly distributed |
*Will they always be collision resistant?* **No**
For example, let $h_2(x)=0$. Then, $h(x)=h_2(h_1(x))=0$, which certainly isn't collision resistant.
--------------------------
*Can it be collision resistant?* **Yes**
For example, suppose we define $h_1(x)=\mathrm{SHA256}(x)$ and
$$
h_2(x)=\begin{cases}
... |
*Will they always be collision resistant?* **No**
For example, let $h_2(x)=0$. Then, $h(x)=h_2(h_1(x))=0$, which certainly isn't collision resistant.
--------------------------
*Can it be collision resistant?* **Yes**
For example, suppose we define $h_1(x)=\mathrm{SHA256}(x)$ and
$$
h_2(x)=\begin{cases}
... |
I was wondering what is the performance bottleneck in RSA algorithm?
Is it the size of message, calculating the modular inverse, exponentiation?
Say I have a fixed value of n to encrypt and decrypt a message would l get a better performace with m being small or large? |
Keyed digest function with below-birthday-bound odds of collision? |
I'm an undergraduate Math student currently taking a cryptology course. I have a question about the RSA signature authentication mechanism.
An RSA signature can be authenticated with the public key of the signer. However, I'm wondering why it can ONLY be authenticated with the signer's public key. Why can't it be m... |
Why can an RSA signature be authenticated ONLY with the signer's public key? |
We don't say this *can't* happen, we just say it *won't* happen.
The only value that will decrypt to $p_2$ under $(e_2,n_2)$ is $p_2^{d_2}$, which we can call $s_2$. So, your problem comes down to asking *what is the probability that $s_1=s_2$*?
If we assume that they're random, and that the moduli are similar e... |
Keyed digest function with odds of collision below the birthday bound? |
I am a student taking a cryptography course
This is an assignment question : -
Alice ------R------> Bob
Alice <-----[R]B---- Bob
Alice -------[R+1]A---> Bob
Why doesn't this protocol provide mutual authentication?
It looks alright to me. |
I am a student taking a cryptography course
This is an assignment question : -
Alice ------R------> Bob
Alice <-----[R]B---- Bob
Alice -------[R+1]A---> Bob
Why doesn't this protocol provide mutual authentication?
It looks alright to me.
If not, is there anyway I can get mutual authentication using ... |
In RSA encryption as practiced (that is, to encipher a message which is a short symmetric key), the message size after padding is fixed and equal to the modulus size. Thus the size of the message has no impact on performance.
Calculating a modular inverse is performed only during key generation, that is seldom. Also... |
In RSA encryption as practiced (that is, to encipher a message which is a short symmetric key), the message size after padding is fixed and equal to the modulus size. Thus the size of the message has no impact on performance.
Calculating a modular inverse is performed only during key generation, that is seldom. Also... |
I am a student taking a cryptography course.
This is an assignment question:
Alice ------R--------> Bob
Alice <-----[R]B------ Bob
Alice ------[R+1]A---> Bob
Why doesn't this protocol provide mutual authentication? It looks alright to me.
If not, is there anyway I can get mutual authentica... |
I'm designing a function f that should be moderately hard to invert and very fast to evaluate in a modern CPU. The function will be used in a proof-of-work function.
I've read that the middle-bits of multiplication are the harder bits to obtain, so I suspect that they are the hardest to invert.
Let $f(x) = ((x^2)... |
Why doesn't this dummy mutual authentication protocol provide mutual authentication? |
I have two-factor authentication enabled on my Google account, and I have this app on my phone which generates a number I have to type when I'm logging in to Google-Mail.
But I don't understand how this number is validated on Google's side. My bank has a similar approach: they gave me this little gadget which also ... |
How does Google's “authenticator number generator” work? |
I am a student taking a cryptography course so forgive me if this comes off as a silly question.
This is an assignment question:
Alice ------R--------> Bob
Alice <-----[R]B------ Bob
Alice ------[R+1]A---> Bob
Why doesn't this protocol provide mutual authentication?
Here's a plausible sc... |
I currently am writing a web app and am using two random hashes that are before and after the string and are both 50 char long (alphabet, numbers, and special chars).
strlen($hash1) = 50;
strlen($hash2) = 50;
$sha3pw = sha3($hash1+$password+$hash2);
What are the chances that someone will be able to ... |
I currently am writing a web app and am using two random hashes that are before and after the string and are both 50 char long (alphabet, numbers, and special chars).
strlen($hash1) = 50;
strlen($hash2) = 50;
$sha3pw = sha3($hash1+$password+$hash2);
What are the chances that someone will be able to find... |
What is the chance of a collision when using SHA-3? |
If I proved a scheme's security under GDH assumption, in real-life, if this DDH oracle does exist, then it's good, but what about other side ? In real-life, if this DDH oracle doesn't exist, then what's the meaning of proving? |
The real-life meaning of proving over a group that doesn't support the oracle? |
We don't say this *can't* happen, we just say it *won't* happen.
The only value that will decrypt to $p_2$ under $(e_2,n_2)$ is $p_2^{d_2}$, which we can call $s_2$. So, your problem comes down to asking *what is the probability that $s_1=s_2$*?
If we assume that they're random, and that the moduli are similar e... |
I'm designing a function f that should be moderately hard to invert and very fast to evaluate in a modern CPU. The function will be used in a proof-of-work function.
I've read that the middle-bits of multiplication are the harder bits to obtain, so I suspect that they are the hardest to invert.
Let $f(x) = ((x^2)... |
Say $m$ is the number and $h=f(m)$ it will be pretty easy to find $m'$ (not necessarily equal to $m$) such that $f(m)=f(m')$ on a modern computer.
The output of $f(m)$ is 16 bits. The following python function will do it very quickly
<pre>
<code>
def find_collision(val):
while True:
test = random.getra... |
Say $m$ is the number and $h=f(m)$ it will be pretty easy to find $m'$ (not necessarily equal to $m$) such that $f(m)=f(m')$ on a modern computer.
**Brute Force**
The output of $f(m)$ is 16 bits. The following python function will do it very quickly
<pre>
<code>
def find_collision(val):
while True:
... |
My understanding is that, simply put, a stream cipher is just a CSPRNG such that $R(i,k)$ will produce a deterministic but statistically random sequence, where $i$ is an IV, and $k$ is the session key. The resultant key-stream $K$ is then combined with plaintext (i.e. $C = K \oplus M$).
Now, if we take two messages ... |
Is it wrong to call a simple stream cipher "partially homomorphic" if no integrity is applied? |
Are there any bijective one-way functions not based on number-theoretic hardness assumptions? |
We don't say this *can't* happen, we just say it *won't* happen.
The only value that will decrypt to $p_2$ under $(e_2,n_2)$ is $p_2^{d_2}$, which we can call $s_2$. So, your problem comes down to asking *what is the probability that $s_1=s_2$*?
If we assume that they're random, and that the moduli are similar e... |
Say $m$ is the number and $h=f(m)$ it will be pretty easy to find $m'$ (not necessarily equal to $m$) such that $f(m)=f(m')$ on a modern computer.
**Brute Force**
The output of $f(m)$ is 32 bits. The following python function will do it
<pre>
<code>
def find_collision(val):
while True:
test = random... |
What is the difference between the term *cipher* (a name like RIJNDAEL) and *mode of operation* (like ECB)?
Aren't these both terms for the encryption/decryption technique? |
What is the difference between a 'cipher' and a 'mode of operation'? |
Hi I have a stream cipher which uses a keystream of:
F(r) || F(r+1) || F(r+2) || ...
Suppose F(r) is the RSA encryption algorithm:
F(r) = r^e mod p where e and p are known , e = 3
My question is:
**If we know F(r), F(r+1) and F(r+2), how can we calculate the subsequent key sequence?**
Is the... |
Say $m$ is the number and $h=f(m)$ it will be pretty easy to find $m'$ (not necessarily equal to $m$) such that $f(m)=f(m')$ on a modern computer.
**Brute Force**
The output of $f(m)$ is 32 bits. The following python function will do it
<pre>
<code>
def find_collision(val):
while True:
test = random... |
This is hypothetical as I can't think of any reason to do this, but out of curiosity..
Could I, for example, take the MD5 digest of a message and concatenate it with the SHA-1 digest (not quite broken, but getting close), to form a secure concatenated digest? Intuitively, I would think the chances of finding a colli... |
Can insecure algorithms be combined to form a secure algorithm? |
*Can insecure algorithms be combined to form a secure algorithm?*
**Yes**: Think of any secure round-based block cipher. The independent rounds are not secure, but put together the overall cipher is.
For a good discussion of the hash example in your question, read [this question](http://crypto.stackexchange.com... |
*Can insecure algorithms be combined to form a secure algorithm?*
**Yes**: Think of any secure round-based block cipher. The independent rounds are not secure, but put together the overall cipher is. I think my favourite example is (currently) the [Even Mansour][1] cipher,
which combines two xor operations and on... |
*Can insecure algorithms be combined to form a secure algorithm?*
**Yes**: Think of any secure round-based block cipher. The independent rounds are not secure, but put together the overall cipher is. I think my favourite example is (currently) the [Even Mansour][1] cipher,
which combines two xor operations and on... |
My understanding is that, simply put, a stream cipher is just a CSPRNG such that $R(i,k)$ will produce a deterministic but statistically random sequence, where $i$ is an IV, and $k$ is the session key. The resultant key-stream $K$ is then combined with plaintext (i.e. $C = K \oplus M$).
Now, if we take two messages ... |
Is a simple stream cipher "partially homomorphic" if no integrity check is applied? |
I am working on teaching myself basic cryptography, in the process I created a simple substitution cipher based on a single alphabet, and a statically defined offset (no key for now). Now that everything is working I want to start on another application to "crack" the offset. The key here is my cipher removes all space... |
Quite a difficult question. What you seem to need is a one-way permutation $P$. Indeed, suppose you have it of width $d$, then the function
$$
F(K,S,R_S) = E_K(P(E_K(S,R_S))),
$$
where $E$ is any good 64-bit block cipher (say, [Simon][1]) should fulfill (2) because of the encryptions of both sides and (4) because i... |
I am working on teaching myself basic cryptography, in the process I created a simple substitution cipher based on a single alphabet, and a statically defined offset (no key for now). Now that everything is working I want to start on another application to "crack" the offset. The key here is my cipher removes all space... |
Given an elliptic curve with equation y^2=x^3+ax+b, and i want to find the number of points (a,b)\in \F_p^2 where the polynomial has repeated roots, how do i do it? I have an intuition it is p, but don't know how to rigorously show it.
THanks
|
Given an elliptic curve with equation $y^2=x^3+ax+b$, and i want to find the number of points $(a,b)\in E(\mathbb{F}_p)$ where the polynomial has repeated roots, how do i do it? I have an intuition it is $p$, but don't know how to rigorously show it.
Thanks
|
If I XOR the output from 2 CSPRNG will the result be better (more random) than the output from either one?
Assume one of the PRNG is biased. |
We define an elliptic curve over a finite field of prime order $p: E(\mathbb{F}_{p})$.
Then $\forall x,y \in \mathbb{F}_{p}$ and $x,y < p$ is the following correct?:
$$\forall x,y \in \mathbb{F}_{p},E(x)=y,if x_i<x_j then E(x_i)<E(x_j)$$
If this is so, then how elliptic curve public key cryptosystems are IND-CP... |
Is an elliptic curve $E\colon y^2=x^3+ax+b$, defined over $\mathbb{F}_{p}$ order preserving for the points $(x,y) \in \mathbb{Z}_p$? |
We define an elliptic curve over a finite field of prime order $p: E(\mathbb{F}_{p})$.
Then $\forall x,y \in \mathbb{F}_{p}$ and $x,y < p$ is the following correct in which $a,b>0$?:
$$\forall x,y \in \mathbb{F}_{p},E(x)=y,if x_i<x_j then E(x_i)<E(x_j)$$
If this is so, then how elliptic curve public key cryptos... |
I am a student taking a cryptography course so forgive me if this comes off as a silly question.
This is an assignment question:
Alice ------R--------> Bob
Alice <-----[R]B------ Bob
Alice ------[R+1]A---> Bob
Why doesn't this protocol provide mutual authentication?
Here's a plausible scenario Alice... |
Why doesn't this authentication protocol work? |
Let $E\colon y^2=x^3+ax+b$ be an elliptic curve, and consider its realisation over the finite field of prime order $p$: $E(\mathbb{F}_{p})$.
Then if $0<a,b$ is the following true?
$$\forall x,y\in[0,p) \text{ s.t. }E(x)=y \text{ : }(x_i<x_j)\implies E(x_i)<E(x_j)$$ |
Is an elliptic curve over $\mathbb{F}_p$ order preserving for the points $(x,y) \in \mathbb{Z}_p$? |
Quite a difficult question. What you seem to need is a one-way permutation $P$. Indeed, suppose you have it of width $d$, then the function
$$
F(K,S,R_S) = E_K(P(E_K(S,R_S))),
$$
where $E$ is any good 64-bit block cipher (say, [Simon][1]) should fulfill (2) because of the encryptions of both sides and (4) because i... |
If we know for some message m, H(m) = 0, how can we forge a DSA signature with only the public key?
Thanks |
if H(m) = 0 for some m, how can a DSA signature be forged? |
If we know for some message m, H(m) = 0, how can we forge a DSA signature with only the public key?
I got that $g^s*r = (g^x)^r$ where x is the private key, but that's one equation with 2 unknown and since desecrate log is hard I can't sub a value for either s or r and find the other and satisfying the condition 0 <... |
I was thinking about stretching salt, but I think it might be a brain fart and want a second opinion.
Key-stretching is good against brute force guessing and assumes your system isn't compromised.
Salting a one-way makes it so you have to compute * n for each password and assumes your system is compromised.
As... |
Does it make sense to stretch non-keys? |
If we know for some message $m$ that $H(m) = 0$, how can we forge a DSA signature with only the public key?
I got that $g^s*r = (g^x)^r$ where $x$ is the private key, but that's one equation with 2 unknowns, and since discrete log is hard, I can't substitute a value for either $s$ or $r$ and find the other and satis... |
If H(m) = 0 for some m, how can a DSA signature be forged? |
I was thinking about stretching salt.
Key-stretching is good against brute force guessing and assumes your system isn't compromised.
Salting a one-way makes it so you have to compute * n for each password and assumes your system is compromised.
Assuming the system is compromised, derived salts are found, stati... |
Given an elliptic curve with equation $y^2=x^3+ax+b$, and i want to find the number of points $(a,b)\in E(\mathbb{F}_p)$ $NOT$ on the curve, how do i do it? I have an intuition it is $p$, but don't know how to rigorously show it.
Thanks
|
Given an elliptic curve with equation $y^2=x^3+ax+b$, and i want to find the number of points $(r,s)\in E(\mathbb{F}_p)$ $NOT$ on the curve, how do i do it? I have an intuition it is $p$, but don't know how to rigorously show it.
Thanks
|
Given an elliptic curve with equation $y^2=x^3+ax+b$, I want to find the number of points $(r,s)\in \mathbb{F}_p^2$ **NOT** on the curve. How do I do it?
I have an intuition that it is $p$, but don't know how to rigorously show it. |
Given an curve with equation $y^2=x^3+ax+b$, I want to find the number of pairs $(r,s)\in \mathbb{F}_p \times \mathbb{F_p}$ **NOT** on the curve. How do I do it?
I have an intuition that it is $p$, but don't know how to rigorously show it. |
Whats wrong with doing $p^2 +1 - |E(F_p)|$? |
Whats wrong with doing $p^2 +1 - |E(\mathbb{F}_p)|$? |
Whats wrong with doing $p^2 +1 - |E(\mathbb{F}_p)|$?
Taking an example from [wikipedia][1] (who reference #1):
> The curve defined by
$$ y^2 = x^3 - x $$
over $\mathbb{F}_{71}$ has $72$ points ($71$ affine points including $(0,0)$ and one point at infinity)
So there are $70*71$ points not on the curve ... |
Given an curve with equation $y^2=x^3+ax+b$, I want to find the number of pairs $(a,b)\in \mathbb{F}_p \times \mathbb{F_p}$ **NOT** on the curve. How do I do it?
I have an intuition that it is $p$, but don't know how to rigorously show it. |
At this point in time the question asked how many points were there that were not on the curve
-------------------------------
Whats wrong with doing $p^2 +1 - |E(\mathbb{F}_p)|$?
Taking an example from [wikipedia][1] (who reference #1):
> The curve defined by
$$ y^2 = x^3 - x $$
over $\mathbb{F}_{71}... |
This is probably not secure enough for a proof of work. I'll outline some attack, of increasing sophistication/complexity and increasing effectiveness (decreasing runtime).
## Brute force ##
The obvious attack is brute force: enumerate all $2^{32}$ possible inputs and check to find the first that produces the de... |
This is probably not secure enough for a proof of work. I'll outline some attack, of increasing sophistication/complexity and increasing effectiveness (decreasing runtime).
## Brute force ##
The obvious attack is brute force: enumerate all $2^{32}$ possible inputs and check to find the first that produces the de... |
Correlated or biased coin protocols? |
How do I calculate the private key in my scenario? |
de mod phi(n)=1
d = 1/(e mod phi(n).
With having e and n, we can calculate the value of d , the private key for cracking.
Why do people worry about factoring d when this technique is available?
I would like to know some real insight into this. |
Why are these techniques not feasible to crack RSA? |
I've done a few obvious searches on google and google scholar and not turned up any security analysis of FreeBSD's geli. Is there some out there, or has it gone unanalyzed since its introduction circa 2005? Frustratingly, it seems to have sprung into existence fully-formed and without explanation of the choices in e.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.