instruction
stringlengths
15
30k
I voted to close this question as a duplicate of [this question][1], because it addresses mostly the same area; however there is one point it doesn't: > What's difference between n & #E(FP)? The difference is that $n$ is the *smallest* positive integer where $nG = O$; while you correctly state that $\#E \cdot G =...
When I was read about the elliptic curve cryptography I found some definition about domain parameter of elliptic curve like the follow. But I did not understand something $p$: prime number. $a, b$: field elements, they specify the equation of the elliptic curve $ E$ over $F_P$, $y^2 ≡ x^3+a • x+b $ $G$: A...
> What's difference between n & #E(FP)? The difference is that $n$ is the *smallest* positive integer where $nG = O$; while you correctly state that $\#E \cdot G = O$, that doesn't mean that $\#E$ is the smallest integer that makes this happen. There may be a smaller integer $n$; $n$ will always be a factor of $\#E...
I’m reading [*“The Security of Multiple Encryption in the Ideal Cipher Model”*](https://www.cosic.esat.kuleuven.be/publications/article-2443.pdf) and I’m having a hard time understanding something. How do I calculate the bounds of cascade cipher from the following formula (where $k$ determines keysize and $n$ is the b...
> What's difference between n & #E(FP)? The difference is that $n$ is the *smallest* positive integer where $nG = O$; while you correctly state that $\#E \cdot G = O$, that doesn't mean that $\#E$ is the smallest integer that makes this happen. There may be a smaller integer $n$; $n$ will always be a factor of $\#E...
I'm writing a thesis focused on [Maurer's provably-secure stream cipher](http://link.springer.com/article/10.1007%2FBF00191321#page-1). Long story short, this cipher works by expanding a short key into a long keystream and then XORring this keystream with the plaintext in order to obtain the ciphertext (and vicecersa)....
Are all binary-additive stream ciphers reciprocal?
A gradual fair exchange (layman term) is a form of fair exchange protocol where Alice will transfer 1 bit to Bob then Bob will transfer 1 bit to Alice. The flaw with this protocol is that the party which starts first may lose out as after Alice transfer her final bit to Bob , Bob may choose not to transfer his final bi...
so I am trying to implement some hw questions and need some help. I am using floyd's cycle finding algorithm but cannot find a leading 40-bit collision after many millions of hashes. (I've done 800 Million iterations so far). Here is my code for reference. #include "sha.h" #include "cryptlib.h" #inc...
Ok, here's how it is supposed to work: we take the function (which maps a string of $n$ bits to a string of $n$ bits), and iterate it repeatedly. After some amount of time, we'll run into a loop (that is, we'll evaluate to a value that we visited before, and there after, we'll repeatedly run through the loop). And, w...
First I need to mention that I can't use BouncyCastle to implement this solution. I have to encrypt files into the file system. Those files are not going to be tranfered over the wire to any other location. They are only going to be stored in the server for later use by an application installed there. The file syste...
I am trying to implement floyds cycle for finding a leading 40-bit hash collision in the SHA-1 algorithm. However, my code will find a repetition even with 800,000,000 hashes. Can I get some help on this issue? Here is my code for reference. int main(){ CryptoPP::SHA1 hash; byte t[CryptoPP::SHA1::...
I am trying to implement floyds cycle for finding a leading 40-bit hash collision in the SHA-1 algorithm. However, my code will not find a repetition even with 800,000,000 hashes. Can I get some help on this issue? Here is my code for reference. int main(){ CryptoPP::SHA1 hash; byte t[CryptoPP::SH...
I am trying to implement [Floyd's cycle finding algorithm](http://en.wikipedia.org/wiki/Cycle_detection#Tortoise_and_hare) for finding a leading 40-bit hash collision in the SHA-1 algorithm. However, my code will not find a repetition even with 800,000,000 hashes. Can I get some help on this issue? Here is my code f...
Let $n$ be an RSA-prime and we know prime factorization of $n(=pq)$. The hash function is the current context maps from a given user identity(id) to a positive integer less than $n$, whose jacobi symbol value is equal to 1. Assume $id$ is any positive integer i.e., $id\in \mathbb{Z}^+$. $H : id -> J(n)$ whe...
Ok, here's how it is supposed to work: we take the function (which maps a string of $n$ bits to a string of $n$ bits), and iterate it repeatedly. After some amount of time, we'll run into a loop (that is, we'll evaluate to a value that we visited before, and there after, we'll repeatedly run through the loop). And, w...
In late 1997, the history of public-key cryptography was turned around with the [announcement by the CESG (April 2000 archive)][1] that - public-key cryptography was theorized in a 1970 note \[1\] by [James Henry Ellis][2]: [_The Possibility of Secure Non-Secret Digital Encryption_][3]; - a feasible realization of ...
In late 1997, the history of public-key cryptography was turned around with the [announcement by the CESG (April 2000 archive)][1] that - public-key cryptography was theorized in a 1970 note \[1\] by [James Henry Ellis][2]: [_The Possibility of Secure Non-Secret Digital Encryption_][3]; - a feasible realization of ...
In late 1997, the history of public-key cryptography was turned around with the [announcement by the CESG (April 2000 archive)][1] that - public-key cryptography was theorized in a 1970 note \[1\] by [James Henry Ellis][2]: [_The Possibility of Secure Non-Secret Digital Encryption_][3]; - a feasible realization of ...
In late 1997, the history of public-key cryptography was turned around with the [announcement by the CESG (April 2000 archive)][1] that - public-key cryptography was theorized in a 1970 note \[1\] by [James Henry Ellis][2]: [_The Possibility of Secure Non-Secret Digital Encryption_][3]; - a feasible realization of ...
In late 1997, the history of public-key cryptography was turned around with the [announcement by the CESG (April 2000 archive)][1] that - public-key cryptography was theorized in a 1970 note \[1\] by [James Henry Ellis][2]: [_The Possibility of Secure Non-Secret Digital Encryption_][3]; - a feasible realization of ...
In late 1997, the history of public-key cryptography was turned around with the [announcement by the CESG (April 2000 archive)][1] that - public-key cryptography was theorized in a 1970 note \[1\] by [James Henry Ellis][2]: [_The Possibility of Secure Non-Secret Digital Encryption_][3]; - a feasible realization of ...
In late 1997, the history of public-key cryptography was turned around with the [announcement by the CESG (April 2000 archive)][1] that - public-key cryptography was theorized in a 1970 note \[1\] by [James Henry Ellis][2]: [_The Possibility of Secure Non-Secret Digital Encryption_][3]; - a feasible realization of ...
When we use `Keytool` to generate a `Keystore` to store Private/Public keys, what Java actually stores inside the Keystore file ? I have observed that `Keytool` asks for the `keypass` and `alias` to generate the key, the `alias` can be used to retrieve any key from the `keystore` given that correct `keypass` is prov...
What Java actually stores inside Keystore when generating Keys?
A sender wants to transmit an *ultra secret* code $M$ which could be either 'go', 'stop' or 'wait'. This could be any selection of code words really and adopted for any use such as transmitting short commands or short status messages. The code list could also be specific or relevant to a current mission/objective. A li...
Can a secret message be securely transmitted within a MAC tag?
A sender wants to transmit an *ultra secret* code $M$ which could be either 'go', 'stop' or 'wait'. This could be any selection of code words really and adopted for any use such as transmitting short commands or short status messages. The code list could also be specific or relevant to a current mission/objective. A li...
Informally, a "Gap" problem is the one that arises when solving the computational (or search) version using an oracle for the decisional version. For example, the Gap Diffie-Hellman Problem (GDH) is to solve the Computational Diffie-Hellman (CDH) problem with the help of a Decisional Diffie-Hellman (DDH) Oracle (whi...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two distinct odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public expon...
In late 1997, the history of public-key cryptography was turned around with the [announcement by the CESG (April 2000 archive)][1] that - public-key cryptography was theorized in a 1970 note \[1\] by [James Henry Ellis][2]: [_The Possibility of Secure Non-Secret Digital Encryption_][3]; - a feasible realization of ...
In late 1997, the history of public-key cryptography was turned around with the [announcement by the CESG (April 2000 archive)][1] that - public-key cryptography was theorized in a 1970 note \[1\] by [James Henry Ellis][2]: [_The Possibility of Secure Non-Secret Digital Encryption_][3]; - a feasible realization of ...
In late 1997, the history of public-key cryptography was turned around with the [announcement by the CESG (April 2000 archive)][1] that - public-key cryptography was theorized in a 1970 note \[1\] by [James Henry Ellis][2]: [_The Possibility of Secure Non-Secret Digital Encryption_][3]; - a feasible realization of ...
I have: N = /*500 decimal numbers*/ E1 = 3740453 E2 = 4226171 M^E1 = /*500 decimal numbers*/ M^E2 = /*500 decimal numbers*/ I must use RSA common modulus attack on it. Using gmpy2.gcdext() i have: a = 624366 b = -552607 So E1*a+E2*b == 1 is True. ...
We can't implement _"AES 512 key size"_ because AES is [defined][1] for key sizes $k\in\{128,192,256\}$ bits only; much like we can't make a bicycle with 3 wheels. I see no reason why we would _want to_ define an AES _variant_ with 512-bit key size (since AES-128 is safe enough for <strike>anything foreseeable</stri...
I am trying to implement [Floyd's cycle finding algorithm](http://en.wikipedia.org/wiki/Cycle_detection#Tortoise_and_hare) for finding a leading 40-bit hash collision in the SHA-1 algorithm. However, my code will not find a repetition even with 800,000,000 hashes. Can I get some help on this issue? Here is my code f...
We can't implement _"AES 512 key size"_ because AES is [defined][1] for key sizes $k\in\{128,192,256\}$ bits only; much like we can't make a bicycle with 3 wheels. I see no reason why we would _want to_ define an AES _variant_ with 512-bit key size (since AES-128 is safe enough for <strike>anything foreseeable</stri...
In late 1997, the history of public-key cryptography was turned around with the [announcement by the CESG (April 2000 archive)][1] that - public-key cryptography was theorized in a 1970 note \[1\] by [James Henry Ellis][2]: [_The Possibility of Secure Non-Secret Digital Encryption_][3]; - a feasible realization of ...
I am currently studying Diffie-Helman protocol. In my lecture notes I have a generator g=2 and I'm in group $Z_{13}^*$ . There I calculate a remainder cycle from 1 to 12 with $r =g^i \mod 13 \forall i [0,12]$ I do not quite understand the relation between the generator and the group. This is my $Z_{13}^*$: ![en...
Are there any working cloud/internet solutions/products that operates on encrypted data such as systems using homomorphic encryption, secure multiparty computation, electronic voting, private information retrieval?
I am currently studying Diffie-Helman protocol. In my lecture notes I have a generator g=2 and I'm in group $Z_{13}^*$ . There I calculate a remainder cycle from 1 to 12 with $r =g^i \mod 13 \forall i [0,12]$ I do not quite understand the relation between the generator and the group. This is my $Z_{13}^*$: ![en...
How does hash function in Elgamal signature scheme prevents existential forgery attack?
How does hash function in Elgamal signature scheme prevent existential forgery attack?
Are there any real world products in which private information retrieval techniques are used?(a data hosting server oblivious of which data item was fetched from it?)If not what are the major barriers for its implementation?
Private Information Retrieval--Is it still theoretical?
Through repeated DH attempts, could Alice and Bob build a large random key for use as a one-time pad? My intuition is that this protocol would be as hard as breaking DH (discrete logarithm).
Let's assume signature scheme questioned should not provide "cleartext" no-noise message. For Euclidean distance (sum of squares over message components), one would start from a protocol described at [..whether a number is greater than another number without knowing the numbers?][1] One would follow Fiat-Shamir i...
To prove that product holds over integers, one would start from commitments with groups of a hidden order. That is, proving party should not know order of the group, which is the case with RSA-like multiplicative group. Consider Prover responses $\rho_x = tx + \alpha_x$, $\rho_y = ty + \alpha_y$, $\rho_z = tz + \...
Assume I recovered the EL-Gammal signatures(75,18) and (75,67) Alice produced on the messages 81 and 14, respectively. Alice's public key is(alpha,beta,p)=(2,35,101). How can I recover Alice secret key?
I tried to find online for the correctness of El-Gamal, but I couldn't find any good resource that will teach me how to show the correctness of El-Gamal, could any body show me how is it done?
Assume I recovered the ElGamal signatures(75,18) and (75,67) Alice produced on the messages 81 and 14, respectively. Alice's public key is (alpha,beta,p)=(2,35,101). How can I recover Alice secret key?
f : {0, 1}4 → {0, 1}4 Given a function fk(x):= f(x ⊕ k) ⊕ k What is the inverse function fk^-1 ? I could not figure out how this would be done. Thanks
A verifier wants to ensure, with only little exchange of data with other systems, that a large block of data $M$ that the verifier holds is also available to some other system(s). It is _not_ an objective to keep $M$ secret, or ensure that the other systems hold $M$ in some specified form (it is fine that $M$ is stored...
$f : \{0, 1\}^4 → \{0, 1\}^4$ Given a function $f_k(x) := f (x ⊕ k) ⊕ k$, what is the inverse function $f_k^{-1}$? I could not figure out how this would be done. Thanks.
> Through repeated DH attempts, could Alice and Bob build a large random key for use as a one-time pad? No, since that is not how a one time pad works. What you are describing is an asymmetric stream cipher of some sorts. A one time pad requires an "offline" exchange of key material. A one time pad when used properl...
> Through repeated DH attempts, could Alice and Bob build a large random key for use as a one-time pad? No, since that is not how a one time pad works. You can use your idea to create cryptographic material to encrypt plaintext using XOR, what you are describing is an asymmetric stream cipher of some sorts. A one...
Good day. While reversing a malware I stumbled upon a function producing 16 byte hash. I tried to determine which one is that by checking every function from [wiki](http://en.wikipedia.org/wiki/List_of_hash_functions). Nothing fits. So, there are two ways: a less known, or just custom algorithm. Can somebody point ...
Assume I recovered the ElGamal signatures (75,18) and (75,67) Alice produced on the messages 81 and 14, respectively. Alice's public key is (alpha,beta,p)=(2,35,101). How can I recover Alice secret key?
I am using Java to write AES-256 to encrypt various files with different extension, the problem is, where am I suppose to store the file extension so the if the data is decrypted, the file extension would be restored ? For example, If I encrypt a "test.pdf" file, I will first read it as a byte array and then encr...
I came to know of semiprimes recently. The simplest explanation of semiprimes is you take any two prime numbers and you multiply them, say 3*11 = 33 in which case 33 would be a semiprime. The numbers may grow bigger but the idea is same. Hypothetically (or maybe in reality as well), you could use a good large semipr...
what are multi-primes and how are they different from semiprimes?
You got what a "semiprime" number is; it's a number which is the product of two primes. When people talk about "multi-prime RSA", what they mean is something which is pretty much the standard RSA algorithm; however the modulus is the product of at least 3 prime numbers (as opposed to standard RSA, which has only 2 p...
OpenSSL supports rc4 with 128-bit keys and rc4 with 40-bit keys. It does not support rc4 with 256-bit keys. My question is... is it possible to modify the state of the pseudo-random generation algorithm (PRGA), given a 128-bit key, to match the initial state a PRGA with a 256-bit key?
Is there any way to share an encrypted file with a group? In the other words, can I encrypt a file with a public key so that each person in a group decrypt it with his/her private key? Is there any way that I have a public key and some different private key for it?
Is there any way to share an encrypted file with a group? In the other words, can I encrypt a file with a public key so that each person in a group decrypt it with his/her private key? Is there any way that I have a public key and some different private key for it? I want to find a way to encrypt a file with a p...
I am currently trying to learn more about Elliptical curve crypthography and have finally started to get things working and undestanding the different pieces. I've written a small project in C# and are currently testing it using really big numbers (the .NET BigInteger class). So far I've implemented the key generati...
what is the meaning of this notation ?? AES{Yi, (Yi XOR Ki | nonce1)} https://tools.ietf.org/html/draft-bhattacharyya-core-coap-lite-auth-00
Schnorr signature is a challenge-response pair $(c, r)$, both from the field defined by order of the group used, verifiable as $c \stackrel {?}{=} Hash(g^r h^{-c}, MessageToBeSigned)$, where $g$ is group generator and $h$ is public key. Both groups of points on elliptic curves and multiplicative "prime" groups ha...
> Now to calculate Q this will take a lot of time since it means I will need to perform point addition an insane number of times unless I'm not understanding something about it. You're missing a point; elliptic curve point addition is associative; that is, for any three points $A$, B$, $C$, we have: $$(A + B) + C...
> Now to calculate Q this will take a lot of time since it means I will need to perform point addition an insane number of times unless I'm not understanding something about it. You're missing a point; elliptic curve point addition is associative; that is, for any three points $A$, B$, $C$, we have: $$(A + B) + C...
**Yes! (restrictions apply)**. ISO/IEC 9796-2 (scheme 1, SHA-1 hash) is a fully standard signature scheme, based on RSA, widely used in the Smart Card industry for public key certificates and message authentication, that adds only 22 bytes of signature overhead (if the message to sign is at least 234 bytes, for 2048-bi...
**Yes! (restrictions apply)**. ISO/IEC 9796-2 (scheme 1, SHA-1 hash) is a fully standard signature scheme, based on RSA, widely used in the Smart Card industry for public key certificates and message authentication, that adds only 22 bytes of signature overhead (if the message to sign is at least 234 bytes, for 2048-bi...
> Now to calculate Q this will take a lot of time since it means I will need to perform point addition an insane number of times unless I'm not understanding something about it. You're missing a point; elliptic curve point addition is associative; that is, for any three points $A, B, C$, we have: $$(A + B) + C = ...
The definition I have is: Two probability ensembles $X = \{X_n\}_{n \in \mathbf{N}}$ and $X = \{Y_n\}_{n \in \mathbf{N}}$ are computationally indistinguishable if for every probabilistic polynomial-time algorithm $D$, every positive polynomial $p(\cdot)$, and all sufficiently large $n$ we have $$ |P(D(X_n, 1^n) =...
Suppose, I suspect that the probability of occurrence of a particular bit as $0$ is $.558$. Since, it is not $.5$, so this is *possibly* a bias. Now, my question is: > What is the minimum number of independent trials I need to confirm my result? I mean, observing this scenario for, say 100 times, must not be conv...
Symmetric encryption: Does using the same key over and over again introduce a vulnerability? Meaning, if I transmit a different piece of plaintext encrypted with the same key every day, will an attacker eventually be able to deduce the key? (In what lengths of time?)
The $X_i$ could be distributed differently, but does not have to be. The idea of an ensemble is just that the distributions are related somehow. A way to think of this is that, $X_i$ could be the distribution of the output from some randomized algorithm given input $i$. Consider, for example, the algorithm that on inpu...
The $X_i$ could be distributed differently, but does not have to be. The idea of an ensemble is just that the distributions are related somehow. A way to think of this is that, $X_i$ could be the distribution of the output from some randomized algorithm given input $i$. Consider, for example, the algorithm that on inpu...
If p and q are two 1024-bit prime numbers, would the maximum length in bits of product $n=pq$ be $1024^2$ or $2^1024$? I think it is $1048576=1024^2$? Also, would the least significant bit of $n$ be a $0$ or a $1$? I am assuming it would be 0? Any explanation of what determines significance would be great Than...
[Schnorr signature][1] is a challenge-response pair $(c, r)$, both from the field defined by order of the group used, verifiable as $c \stackrel {?}{=} \operatorname{Hash}(\text{MessageToBeSigned}\|g^r h^{-c})$, where $g$ is group generator and $h$ is public key. Both groups of points on elliptic curves and multi...
**Yes! (restrictions apply)**. ISO/IEC 9796-2 (scheme 1, SHA-1 hash, option 1 also know as implicit hash identifier) is a fully standard signature scheme, based on RSA, widely used in the Smart Card industry for public key certificates and message authentication, that adds only 22 bytes of signature overhead (if the me...
If p and q are two 1024-bit prime numbers, would the maximum length in bits of product $n=pq$ be ${1024}^2$ or $2^{1024}$? I think it is ${1048576}={1024}^2$? Also, would the least significant bit of $n$ be a $0$ or a $1$? I am assuming it would be $0$? Any explanation of what determines significance would be gre...
Suppose, I suspect that the probability of occurrence of a particular bit as $0$ is $.558$. Since, it is not $.5$, so this is *possibly* a bias. Now, my question is: > What is the minimum number of independent trials I need to confirm my result? I mean, observing this scenario for, say 100 times, must not be conv...
**Yes! (restrictions apply)**. ISO/IEC 9796-2 (scheme 1, SHA-1 hash, option 1 also know as implicit hash identifier, alternative signature production function) is a fully standard signature scheme, based on RSA, widely used in the Smart Card industry for public key certificates and message authentication, that adds onl...
**Yes! (restrictions apply)**. ISO/IEC 9796-2 (scheme 1, SHA-1 hash, option 1 also know as implicit hash identifier, alternative signature production function) is a fully standard signature scheme, based on RSA, widely used in the Smart Card industry for public key certificates and message authentication, that adds onl...
**Yes! (restrictions apply)**. ISO/IEC 9796-2 (scheme 1, SHA-1 hash, option 1 also know as implicit hash identifier, alternative signature production function) is a fully standard signature scheme, based on RSA, widely used in the Smart Card industry for public key certificates and message authentication, that adds onl...
Im trying to understand RSA encryption (as a cryptography beginner) and i was wondering if anyone could answer this quesiton thanks. 1. go on this wiki page http://en.wikipedia.org/wiki/Optimal_asymmetric_encryption_padding 2. scroll down to the 2 numbered points. **"OAEP satisfies the following two goals:"** 3. ...
I'm trying to understand RSA encryption (as a beginner in cryptography). 1. go on this wiki page http://en.wikipedia.org/wiki/Optimal_asymmetric_encryption_padding 2. scroll down to the 2 numbered points: "OAEP satisfies the following two goals:" 3. The 2nd point says *"Prevent partial decryption of ciphertexts"*...
And how can we prove that it is,or it΄s not?
Is the Vigenere Cryptosystem malleable?
**Yes! (restrictions apply)**. ISO/IEC 9796-2 (scheme 1, SHA-1 hash, option 1 also know as implicit hash identifier, alternative signature production function) is a fully standard signature scheme, based on RSA, widely used in the Smart Card industry for public key certificates and message authentication, that adds onl...
**Yes! (restrictions apply)**. ISO/IEC 9796-2 (scheme 1, SHA-1 hash, option 1 also know as implicit hash identifier, alternative signature production function) is a fully standard signature scheme, based on RSA, widely used in the Smart Card industry for public key certificates and message authentication, that adds onl...
Is the Vigenère Cryptosystem malleable, and how can we prove that it is (or it is not) malleable?
Is the Vigenère Cryptosystem malleable?
Is it possible to find a collision in Merkle-Damgard just by omitting the extra one bit that is appended to each input without having a collision in compression function?
Is it possible to find a collision in Merkle–Damgård just by omitting the extra one bit that is appended to each input without having a collision in compression function?
We learned that length padding was used in Merkle–Damgård where after padding with zeros another block is added that contains the initial length of the input. This is supposed to prevent same hash values for the different inputs $x \ne x0..0$. Then again for Keccak we learned it is possible to use simple padding (e...
Why is an IV used in Merkle–Damgård transform?
I am trying to figure out this question: > Generalize the Merkle–Damgård construction for any compression func­tion that compresses by at least one bit . You should refer to a general input length £' and general output length E (with £' > E). It is in my understanding that the Merkle–Damgård takes an input of ...
I'm trying to find a collision for the following (modified) Merkle–Damgård hash function. > Suppose we already have a hash function $h : \mathbb{Z}_2^{2·n} \to \mathbb{Z}_2^n$ for fixed length bit strings, with $h(0\ldots 0)= 0\ldots 0$. > The input $x$ (bit string, variable size) is divided into blocks $x_j$ of ...