instruction
stringlengths
15
30k
I am generating RSA Public and Private keys with node.js instead of reading them from pem/crt files as I can hide them inside a private object using this module https://www.npmjs.org/package/private this node.js module https://www.npmjs.org/package/keypair puts text in front and at the end of each public and private...
This is very difficult, if you don't trust anyone, as Ricky Demer explains. You can have each party publish a [commitment](https://en.wikipedia.org/wiki/Commitment_scheme) to their move. However, the problem is that a malicious party might decide not to open their commitment. For instance, suppose Alice publishes ...
I'm unsure of how exactly the salt is manipulated by scrypt and its potential contribution if any to overall password entropy if passwords & salts are stored only in human memory for a decentralized implementation. For this implementation, a cryptocurrency login where the salt does not exist in any repository such a...
I am generating RSA Public and Private keys with node.js instead of reading them from pem/crt files as I can hide them inside a private object using this module https://www.npmjs.org/package/private this node.js module https://www.npmjs.org/package/keypair puts text in front and at the end of each public and private...
This is very difficult, if you don't trust anyone, as Ricky Demer explains. You can have each party publish a [commitment](https://en.wikipedia.org/wiki/Commitment_scheme) to their move. However, the main problem is that a malicious party might decide not to open their commitment. For instance, suppose Alice publ...
I'm looking for an algorithm where *n* participants each have a different secret number between $[0..x]$ (and where $x$ is known) and where the participants then select randomly another, non-secret, number between $[0..x]$ which *must not* clash with the secret of any participant and which must not reveal any number us...
I have at least three, distinct motivations for having a simple way to use asymmetric key encryption by hand or without modern computers. First, I was recently demonstrating to a 12-year-old how encryption works. I created some basic cyphers and had him figure them out. (I recommend this; it's quite fun.) Wanting to...
Is it possible to perform a rudimentary asymmetric encryption algorithm by hand?
I have at least three, distinct motivations for having a simple way to use asymmetric key encryption by hand or without modern computers. First, I was recently demonstrating to a 12-year-old how encryption works. I created some basic cyphers and had him figure them out. (I recommend this; it's quite fun.) Wanting to...
Is it possible to perform a rudimentary asymmetric key encryption algorithm by hand?
In [FIPS-197](http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf) §5.1.1 , it says the first transformation in the SubBytes() transformation is: > 1. Take the multiplicative inverse in the finite field $\text{GF}(2^8)$ described in Sec. 4.2; the element $\{00\}$ is mapped to itself. Looking at Sec. 4.2 i...
How to find the multiplactive inverse in the first transformation of the SubBytes() transformation in AES?
In [FIPS-197](http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf) §5.1.1 , it says the first transformation in the SubBytes() transformation is: > 1. Take the multiplicative inverse in the finite field $\text{GF}(2^8)$ described in Sec. 4.2; <br> the element $\{00\}$ is mapped to itself. Looking at Sec...
How can I find the multiplicative inverse in the first transformation of the SubBytes() transformation in AES?
In [FIPS-197](http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf) §5.1.1 , it says the first transformation in the SubBytes() transformation is: > 1. Take the multiplicative inverse in the finite field $\text{GF}(2^8)$ described in Sec. 4.2; <br> the element $\{00\}$ is mapped to itself. Looking at Sec...
They are referring to the formula for [Bézout's identity][1] which calculates the [greatest common divisor][2], extended to a finite field, where 1 is the multiplicative neutral element. > From the relation $b(x)a(x)+m(x)c(x)=1$, $$b^{-1}(x)=a(x)\mod m(x)$$ I cant figure out what $a(x)$ and $c(x)$ are? In this ca...
I am trying find a transfer method for this problem. Suppose Alice and Bob both has access to a function $\text{F}$ with two parameters. $\text{F}(x,y)$ randomly returns $p$ to alice and $q$ to Bob such that $x\times y=p \oplus q$. Now as per rules of Oblivious Transfer, Alice has $s_0$ and $s_1$ and Bob has $c$. Bob ...
I have blinded $m = 16$ with $r= 13$, $e = 7$ and $n = 209$. This resulted in $m' = 464$, which led to a $s' = 8$. Now, I want to unblind this $s'$ by using $s = s' \times r^{-1}$ but im stuck at filling in the $r^{-1}$?
Key space is the set of all possible keys that can be used to generate a key.we using the number of valid key to describe it. Q: I've given a hill cipher of block size $k$ over alphabet of size $p$, where $p$ is prime, how many keys there (valid key)? since the hill cipher key is a $k$ x $k$ matrix, all the eleme...
In AES the forward affine tranformation matrix is defined as: $$ \begin{bmatrix} 1& 0& 0& 0& 1& 1& 1& 1 \\ 1& 1& 0& 0& 0& 1& 1& 1 \\ 1& 1& 1& 0& 0& 0& 1& 1 \\ 1& 1& 1& 1& 0& 0& 0& 1 \\ 1& 1& 1& 1& 1& 0& 0& 0 \\ 0& 1& 1& 1& 1& 1& 0& 0 \\ 0& 0& 1& 1& 1& 1& 1& 0 \\ 0& 0& 0& 1& 1& 1& 1& 1 \\ \end{bmatrix}$$ ...
It seems like email is at least analogous to public-key cryptography, the public portion of the key being your email address, and the private portion of the key being the password to the email account. Is this merely an analogy, or is email in fact an instance of public-key cryptography?
Is email an example of public-key cryptography?
I've been reading this [question][1] where a detailed description of mine is given, I've understood that a polynomial-time adversary is an adversary for which the only feasible strategy are those that take polynomial time to run; anyway, I just can't understand why do we require the adversary to be *probabilistic*. ...
What does it mean for an adversary to run in PPT?
There's a program that uses the following OpenSSL function... DH_generate_parameters(256, 5, NULL, NULL) ...to create DH parameters which are later used for hundreds of key exchanges (and the one-time keys used to encrypt login details sent over Internet). The manual page says 256 is `prime_len` in bits. *...
I'll be using AES from OpenSSL. I understand why I don't want to use ECB from reading pages like this one: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Common_modes ...which has a great example of what happens when you attempt to encrypt with electronic codebook. But what I'm missing, is some s...
How do I decide what mode to use?
I saw this awesome video: http://www.wimp.com/howencryption/ Which shows how encryption works using "discrete logarithm". The example says: `3^x mod 17`. I understood that 3 is called generator. Because it has no "straight" root and when used with any exponents it walks through entire clock (till 17 in that case)...
Modulo settings for successful encryption?
I'll be using AES from OpenSSL. I understand why I don't want to use ECB from reading pages like this one: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Common_modes ...which has a great example of what happens when you attempt to encrypt with electronic codebook. But what I'm missing, is some s...
Key space is the set of all possible keys that can be used to generate a key. We using the number of valid key to describe it. I've given a hill cipher of block size $k$ over alphabet of size $p$, where $p$ is prime, how many keys there (valid key)? Since the hill cipher key is a $k$ x $k$ matrix, all the element...
I'll be using AES from OpenSSL. I understand why I don't want to use ECB from reading pages like [this Wikipedia article](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Common_modes), which has a great example of what happens when you attempt to encrypt with electronic codebook. But what I'm missing, i...
I saw [this awesome video](http://www.wimp.com/howencryption/) which shows how encryption works using "discrete logarithm". The example says: `3^x mod 17`. I understood that `3` is called “generator”, because it has no "straight" root and when used with any exponents it walks through entire clock (till 17 in that ca...
I'll be using AES from OpenSSL. I understand why I don't want to use ECB from reading pages like [this Wikipedia article](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Common_modes), which has a great example of what happens when you attempt to encrypt with electronic codebook. But what I'm missing, i...
Is there a deterministic number generator that allows me to share some (not all) numbers I've generated using a smallish seed?
I was just wondering, is there a type of deterministic number generator that allows me to share some (not all) numbers I've generated using a smallish seed? I have pairs of random numbers and need to make one number from each pair public. The point of sharing with a type of seed is, that my application needs to do h...
I have an encryption scheme that uses a 256-bit master key, from which 2 separate keys (one for AES-256-CTR encryption and one for a HMAC-SHA256) are derived using HKDF. However, I'm not sure exactly how to utilize HKDF without screwing it up, so straight to my concerns: 1. Is it safe to just use SHA-512 as the has...
Assuming we have an El-Gamal pk tuple $(G,q,g,g^s)$. Someone, knows only the first three parameters. In round $i$, I send him $X_i=(g^s)^{t_i}$ (the $t_i$ values are chosen randomly for each round), and I want to prove to him that I know also $s$ or $st_i$, so I choose a random $\rho \in \{0,1,...,q-1\}$, and send h...
How to prove NIZK proof of knowledge?
[RFC 5959][1] specifies the encrypted storage of private keys based on PBKDF2-HMAC-SHA-256 and AES encryption ([in ECB mode][2]). Is there a particular reason AES is used, instead of simply XORing the key material with the PBKDF2 output? Is it simply to make storage of long keys faster, because a long PBKDF2 output ...
Are poly1305 authenticators distinguishable from random data?
Assume Alice authenticates a message $M$ with nonce $N$ and secret key $K$, creating authenticator $A$. She then sends $A$ across the network. [The **Poly1305** paper](http://cr.yp.to/mac/poly1305-20050329.pdf) does not seem to specify whether it is possible for an adversary, whom has seen $A$, to determine whether ...
In [FIPS-197](http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf) §5.1.1 , it says the first transformation in the SubBytes() transformation is: > 1. Take the multiplicative inverse in the finite field $\text{GF}(2^8)$ described in Sec. 4.2; <br> the element $\{00\}$ is mapped to itself. Looking at Sec...
I saw [this awesome video](http://www.wimp.com/howencryption/) which shows how encryption works using "discrete logarithm". The example says: $3^x\mod17$. I understood that $3$ is called “generator”, because it has no "straight" root and when used with any exponents it walks through entire clock (till $17$ in that c...
In the public key cryptography, number of keys required for secure communication between n parties will be? {Please be specific & also show the full logic & give proper explanations}
In the public key cryptography, number of keys required for secure communication between n parties will be?
In the public key cryptography, number of keys required for secure communication between n parties will be? In my view the answer should be n*n (or n^2 or n squared) Reason: There are ‘n’ Parties. Every Party has One (1) Public Key (for Encryption). Also, every Party has n-1 private keys (paired) (for Decryption), So...
In the public key cryptography, number of keys required for secure communication between n parties will be? In my view the answer should be $n^2$ **Reason**: There are ‘$n$’ Parties. Every Party has One (1) Public Key (for Encryption). Also, every party has $(n-1)$ private keys (paired) (for Decryption). So every...
In the public key cryptography, number of keys required for secure communication between n parties will be? In my view the answer should be $n^2$ Reason: There are ‘$n$’ Parties. Every Party has One (1) Public Key (for Encryption). Also, every party has $(n-1)$ private keys (paired) (for Decryption). So every par...
In the public key cryptography, number of keys required for secure communication between n parties will be? In my view the answer should be $n^2$ Reason: There are ‘$n$’ Parties. Every Party has One (1) Public Key (for Encryption). Also, every party has $(n-1)$ private keys (paired) (for Decryption). So every par...
In public key cryptography, how many keys are required for secure communication between n parties? In my view the answer should be $n^2$. Reason: There are ‘$n$’ Parties. Every Party has One (1) Public Key (for Encryption). Also, every party has $(n-1)$ private keys (paired) (for Decryption). So every party has $...
In public key cryptography, how many keys are required for secure communication between n parties?
A _**signature scheme with message recovery_** can be defined as three functions [easily computable, with a compact and public definition]: - a key generation function, - with input a random bitstring, - with output a public/private key pair $(K_\text{pub},K_\text{priv})$, - a signature function $\mathcal...
A _**signature scheme with message recovery_** can be defined as three functions [easily computable, with a compact and public definition]: - a key generation function, - with input a random bitstring, - with output a public/private key pair $(K_\text{pub},K_\text{priv})$, - a signature function $\mathcal...
A _**signature scheme with message recovery_** can be defined as three functions [easily computable, with a compact and public definition]: - a key generation function, - with input a random bitstring, - with output a public/private key pair $(K_\text{pub},K_\text{priv})$, - a signature function $\mathcal...
A _**signature scheme with message recovery_** can be defined as three functions [easily computable, with a compact and public definition]: - a key generation function, - with input a random bitstring, - with output a public/private key pair $(K_\text{pub},K_\text{priv})$, - a signature function $\mathcal...
I have been examining the [scrypt paper][1], and I noted the claims in table 1. For 10 random ASCII characters, the cost at that time for scrypt set to (2^14, 8, 1) is estimated to be $175T/yr. Can a formula be constructed to determine the parameters as a function of time since those tests were performed? [1...
How to adjust scrypt parameters for Moore's Law?
A _**signature scheme with message recovery_** can be defined as three functions [easily computable, with a compact and public definition]: - a key generation function, - with input a random bitstring, - with output a public/private key pair $(K_\text{pub},K_\text{priv})$, - a signature function $\mathcal...
I have been examining the [scrypt paper][1], and I noted the claims in table 1. For 10 random ASCII characters, the cost at that time for scrypt set to (2^14, 8, 1) is estimated to be $175T/yr. Can formulae for equivalent year cost be constructed to determine the parameters as functions of time since those tests ...
A _**signature scheme with message recovery_** can be defined as three functions [easily computable, with a compact and public definition]: - a key generation function, - with input a random bitstring, - with output a public/private key pair $(K_\text{pub},K_\text{priv})$, - a signature function $\mathcal...
A _**signature scheme with message recovery_** can be defined as three functions [easily computable, with a compact and public definition]: - a key generation function, - with input a random bitstring, - with output a public/private key pair $(K_\text{pub},K_\text{priv})$, - a signature function $\mathcal...
Informally, a signature scheme with message recovery is one where some or all of the message is embedded in the signature, allowing to conserve bandwidth. --- A _**signature scheme with total message recovery_** can be formally defined as three functions [easily computable, with a compact and public definition]: ...
I have been examining the [scrypt paper][1], and I noted the claims in table 1. > For 10 random ASCII characters, the cost at that time for scrypt set to $(2^{14}, 8, 1)$ is estimated to be $175T/yr. Can formulae for equivalent year cost be constructed to determine the parameters as functions of time since those ...
Informally, a signature scheme with message recovery is one where some or all of the message is embedded in the signature, allowing to conserve bandwidth. --- A _**signature scheme with total message recovery_** can be formally defined as three functions [easily computable, with a compact and public definition]: ...
I'd like to get an overview of how the signatures with message recovery work, especially in case EMV and other smart card systems. Is there a nice overview available without being required to read the whole ISO/IEC 9796-2? I've already had a look at the “[*Practical Cryptanalysis of ISO/IEC 9796-2 and EMV Signature...
Informally, a signature scheme with message recovery is one where some or all of the message is embedded in the signature, allowing to conserve bandwidth. --- A _**signature scheme with total message recovery_** can be formally defined as three functions [easily computable, with a compact and public definition]: ...
> Can formulae for equivalent year cost be constructed to determine the parameters as functions of time since those tests were performed? Yes, but you have to make a lot of assumptions. First, though, note that the paper says: > We caution again that these values are very approximate [...] Nevertheless, we believ...
Informally, a signature scheme with message recovery is one where some or all of the message is embedded in the signature, allowing to conserve bandwidth. --- A _**signature scheme with total message recovery_** can be formally defined as three functions [easily computable, with a compact and public definition]: ...
I just read [High performance physical random number generator][1] by K.H. Tsoi, K.H. Leung and P.H.W. Leong. It proposes a physical RNG of speed 400 Mbps. Is this the fastest random number generator at this moment? [1]: http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=04271377
Informally, a signature scheme with message recovery is one where some or all of the message is embedded in the signature, allowing to conserve bandwidth. --- A _**signature scheme with total message recovery_** can be formally defined as three functions [easily computable, with a compact and public definition]: ...
I just read [High performance physical random number generator][1] by K.H. Tsoi, K.H. Leung and P.H.W. Leong. It proposes a physical RNG of speed 400 Mbps. Is this the fastest random number generator at this moment? [1]: http://www.ee.usyd.edu.au/people/philip.leong/UserFiles/File/papers/prng_cdt07.pdf
The problem with questions that ask for “*the fastest*” is, that such questions always raise the counter-question: compared to what exactly? Also, your question doesn’t specify if you mean cryptographically secure physical random number generators, or *any* physical random number generator. Anyway… 400 Mbps doesn’t...
The problem with questions that ask for “*the fastest*” is, that such questions always raise the counter-question: compared to what exactly? Also, your question doesn’t specify if you mean cryptographically secure physical random number generators, or *any* physical random number generator. Anyway… 400 Mbps doesn’t...
Informally, a signature scheme with message recovery is one where some or all of the message is embedded in the signature, allowing to conserve bandwidth. --- A _**signature scheme with total message recovery_** [some sources make _total_ implicit, e.g. the [HAC][1] section 11.2.3] can be formally defined as three ...
Informally, a signature scheme with message recovery is one where some or all of the message is embedded in the signature, allowing to conserve bandwidth when transmitting a signed message. --- A _**signature scheme with total message recovery_** [some sources make _total_ implicit, e.g. the [HAC][1] section 11.2.3...
The problem with questions that ask for “*the fastest*” is, that such questions always raise the counter-question: compared to what exactly? Also, your question doesn’t specify if you mean cryptographically secure physical random number generators, or *any* physical random number generator. Anyway… 400 Mbps doesn’t...
Informally, a signature scheme with message recovery is one where some or all of the message is embedded in the signature, allowing to conserve bandwidth when transmitting a signed message, compared to a signature scheme with appendix. --- A _**signature scheme with total message recovery_** [some sources make _tot...
I have spent some time studying the "Mental Poker" protocol (sometimes called SRA), initially proposed by Shamir, Rivest, and Adleman -- http://people.csail.mit.edu/~rivest/ShamirRivestAdleman-MentalPoker.pdf Much of the current literature surrounding SRA deals with implementations, most of which seek to address ...
So, I'm working with a system that allows individual users to each have their own private-public key pair. I would like to allow multiple users to use their private key to sign the same piece of information to confirm they agree with something. By signature, I mean the public key can be used to check the signature ...
Is there a way to compress multiple signatures of the same data?
Informally, a signature scheme with message recovery is one where some or all of the message is embedded in the signature, allowing to conserve bandwidth when transmitting a signed message, compared to a signature scheme with appendix. --- A _**signature scheme with total message recovery_** [some sources make _tot...
Informally, a signature scheme with message recovery is one where some or all of the message is embedded in the signature, allowing to conserve bandwidth when transmitting a signed message, compared to a signature scheme with appendix. --- A _**signature scheme with total message recovery_** [some sources make _tot...
A centralized signing machine is vulnerable to attackers -------------------------------------------------------- In the situation where a private key has been distributed over *R* number of machines, which each hold a part of the secret, these *R* machines can send their share to the signing machine, which will reco...
Elliptic Curve Crypto, is a distributed signing method possible using Shamir's Secret Sharing?
A centralized signing machine is vulnerable to attackers -------------------------------------------------------- In the situation where a private key has been distributed over *R* number of machines, which each hold a part of the secret, these *R* machines can send their share to the signing machine, which will reco...
*Note: A distributed signature scheme exists for RSA: [Practical Threshold Signatures, Victor Shoup][1]. Is it possible to adapt such scheme for ECC?* A centralized signing machine is vulnerable to attackers -------------------------------------------------------- In the situation where a private key has been ...
After playing cat and mouse with an number of quantum-resistant signature schemes and coming up with nothing with small enough signatures, I'm turning to Crypto.SE. I need a quantum-resistant signature scheme with the smallest $signature || publickey$ that you can find. Private key size shouldn't really matter, can't I...
What is the quantum-resistant signature scheme with the smallest signature + pubkey?
After playing cat and mouse with an number of quantum-resistant signature schemes and coming up with nothing with small enough signatures, I'm turning to Crypto.SE. I need a quantum-resistant signature scheme with the smallest $signature || publickey$ that you can find. Private key size shouldn't really matter, can't I...
I've seen that it's widely accepted that before Gentry's breakthrough (which is not practical yet) in 2009 there were no known full homomorphic encryption scheme. I've read here in another answer that: > "...there are many known partially homomorphic cryptosystems, each one > can either multiply or add numbers."...
Paillier can add and multiply, why is it only partially homomorphic?
After playing cat and mouse with an number of quantum-resistant signature schemes and coming up with nothing with small enough signatures, I'm turning to Crypto.SE. I need a quantum-resistant signature scheme with the smallest $signature || publickey$ that you can find. Private key size shouldn't really matter, can't I...
You can use multi-signatures. See [BN06][1] for example. [1]: http://dl.acm.org/citation.cfm?id=1180453
I have a question about the Pohlig-Hellman Algorithm for the discrete log problem. I understand the concept, but doing the exact calculations I get confused at one point; to illustrate, let's look at the equation $2^x=3$ in the group $(\mathbb{Z}/29\mathbb{Z})^*$. If my calculations are correct, we get that $x \equ...
Yes, this should be solvable and should be doable in a reasonable amount of computation time, using a pretty cool homomorphic cryptosystem. Here is one approach: the participants jointly pick a random number $y$, publicly commit to $y$, and then they all prove/check in zero knowledge that $y$ is different from their...
I'm looking for an algorithm where *n* participants each have a different secret number between $[0..x]$ (and where $x$ is known) and where the participants then select randomly another, non-secret, number between $[0..x]$ which *must not* clash with the secret of any participant and which must not reveal any number us...
Looking at the use of [Linear Feedback Shift Registers](https://en.wikipedia.org/wiki/Linear_feedback_shift_registers) in cryptographic algorithms, I have learned that [the Berlekamp-Massey algorithm](https://en.wikipedia.org/wiki/Berlekamp%E2%80%93Massey_algorithm) can be used to find the (shortest) LFSR that generate...
Yes, this should be solvable and should be doable in a reasonable amount of computation time, using a pretty cool homomorphic cryptosystem. Here is one approach: the participants jointly pick a random number $y$, publicly commit to $y$, and then they all prove/check in zero knowledge that $y$ is different from their...
I've read that Newton polynomials have better computational complexity, but Shamir's uses Lagrange polynomials instead. Does anyone know if there are particular reason why Newton polynomials aren't used instead? Thanks