instruction
stringlengths
15
30k
With ECDSA is there a way for the verifier to prove any properties of $k$, without knowing $k$ or the private key $D_A$? (I understand that $k$ should be random, or follow RFC6979, but I'm curious.) In particular, could the verifier compute, given a signature $(r,s)$ and a message $m$, that: 1. $k$ is odd 2. ...
I read a lot about Diffie-Hellman, but there is one thing I dont understand: why does the modulus p need to be a prime? What if it would not be a prime?
Why does the modulus of Diffie–Hellman need to be a prime?
With ECDSA, given $(r,s)$ and $m$, is there a way for a verifier to calculate any (boolean) properties of $k$, without knowing $k$ or the private key $D_A$? (I understand that $k$ should be random, or follow RFC6979, but I'm curious.) In particular, could the verifier compute, given a signature $(r,s)$ and a mess...
With ECDSA is there a way for the verifier to calculate any properties of $k$?
A key pair has a private key $D_A$ and a public key $Q_A$. $D_A$ is an integer less than the curve's $n$. Is there any (boolean) function of the private key $f(D_A)$ which can be transformed into a function of the public key $f'(Q_A)$? i.e. are there any relationships between private keys which can be calculat...
With EC secp256k1 is there a way of transforming a function of the private key to a function of the public key?
I read this paper https://eprint.iacr.org/2012/078.pdf and I didn't understand what does the author mean with scale-invariance perspective. The perspective in which we view the ciphertext is accomplished by the algorithms used ? I refer to BitDecomp, PowersOfTwo and the tensor product. Or the perspective is achi...
What is scale-invariance notion of a fully homomorphic encryption scheme?
Is there a pedagogical library-less implementation of DSA available to read? (Not ECDSA.) Obviously BigInteger and hash functions may be from libraries, but I want to *read* the implementation of all of the calculations involved in signing a message and verifying a signature, using whatever BigInteger operations ar...
Is there a library-less implementation of DSA available to read?
I am using the [MIRACL Library][1] to implement an Elliptic Curve Diffie Hellman based Key Exchange according to [ECDH-Scheme-Wikipedia][2]. Referring to the Miracl Docs they suggest a few curves. Each curve is with respect to a prime p which is n bits in length [Miracl Docs EC suggestions][3]. How does the n bi...
How does the size of the prime affect Elliptic Curve Bit Security?
I'm building a cloud storage application that will store files on my servers. I want these files to be encrypted with AES in CTR mode and the key will be always the same. I'm wondering what would be the best way to derive an IV. The encryption will happen on many servers so I can't use progressive values (e.g....
I'm building a cloud storage application that will store files on my servers. I want these files to be encrypted with AES in CTR mode and the key will be always the same. I'm wondering what would be the best way to derive an IV. The encryption will happen on many servers so I can't use progressive values (e.g....
I'm building a cloud storage application that will store files on my servers. I want these files to be encrypted with AES in CTR mode and the key will be always the same. I'm wondering what would be the best way to derive an IV. The encryption will happen on many servers so I can't use progressive values (e.g....
I noticed that with only an RSA public key, it is possible/tractable to calculate $m^{p+q} \pmod n$ for any $m$ without knowing $p$ or $q$. Namely, $m^{p+q} \equiv m^{n+1} \pmod n$. (This follows from $\phi(n) = n - p - q + 1$ and the order of all multiplicative subgroups $\mod n$ dividing $\phi(n)$.) Is this usef...
I have a public key: MIGJAoGBAKv4OKlpYBAQEFAAOCADqTnisSvdLP+mTswZJdbtk1J+4+qAySJuENCe +1rcnERjdNa2LTS2y//REwXWo8Jd3mU42GfZJrJhSLFOgYnX3efuMBVebWlqUNGt sMedxuVaFBL3SoqU7e5RELIsuArCJJIgz86BQDX0x63VpXAgMBAAE= which, if you use any online base64 decoder, will say it’s invalid Base64 encoding – which is ...
Nowadays, One time password are generally used for two-factor authentication. For example, in Banking System, before making an transaction, an OTP is sent to user in order to verify his/her authenticity. There are many schemes developed by researchers. Just have a look at https://www.cs.umd.edu/~jkatz/papers/password.p...
I am doing a paper on textbook RSA (highschool-level). I am explaining and proving the significance of the public key exponent in time and security. So far, I have encrypted a constant message with a constant modulus but using different public exponents. The calculation time has been annotated using Mathematica. I ...
How many bits of the exponent $x$ are leaked when you calculate and reveal $g^x \pmod p$ for some generator $g$ of $\mathbb Z^∗_p$? The low bit of $x$ is obviously leaked: the low bit equals $1-\frac{\left(\frac{g^x}{p}\right)+1}{2}$, with parentheses representing the Legendre symbol.
How many bits of an exponent are leaked when doing a powmod?
I'm aware that if the same value for $k$ is used with the same private key $D_A$ to sign two different messages, then anyone possessing the two messages $m_0$ and $m_1$ and two signatures $(r_0, s_0)$ and $(r_1, s_1)$may recover $D_A$ trivially (as in fail 0verflow's PS3 private key recovery). Does there exist a way...
Is there a single-use signature scheme, where a second use of the private key discloses it to the world?
Let's say I am given to CSPRNGs: RNG1 and RNG2.<br> I want to select the best one of the two for cryptography.<br> How should I do it?<br> Any of the two RNGs can be initialized with a secret key during tests and any number of bytes can be generated from each RNG.<br> Are there statistical test suites already out ...
How to compare two CSPRNGs?
I'm aware that if the same value for $k$ is used with the same private key $D_A$ to sign two different messages, then anyone possessing the two messages $m_0$ and $m_1$ and two signatures $(r_0, s_0)$ and $(r_1, s_1)$may recover $D_A$ trivially (as in fail0verflow's PS3 private key recovery). Does there exist a way ...
With ECDSA (and possibly DSA too) I'm aware that if the same value for $k$ is used with the same private key $D_A$ to sign two different messages, then anyone possessing the two messages $m_0$ and $m_1$ and two signatures $(r_0, s_0)$ and $(r_1, s_1)$may recover $D_A$ trivially (as in fail0verflow's PS3 private key rec...
You may want to rethink your whole setup. Like mentioned in the comments, there is a lot more to securely storing files than throwing encryption on them. In particular, you need to be concerned with authentication (CTR without authentication is malleable). I would also look into client side encryption in anything that ...
Lets say that you have two devices that need to communicate in a secure manner. These devices can share secrets before communication takes place (This sharing of secrets occurs over another secure channel). Furthermore, these devices can not use public key cryptography. Assuming that the primitives are perfectly i...
What what communications security protocols exist that aren't based on PKC?
With ECDSA (and possibly DSA too) I'm aware that if the same value for $k$ is used with the same private key $D_A$ to sign two different messages, then anyone possessing the two messages $m_0$ and $m_1$ and two signatures $(r_0, s_0)$ and $(r_1, s_1)$may recover $D_A$ trivially (as in fail0verflow's PS3 private key rec...
Lets say that you have two devices that need to communicate in a secure manner. These devices can share secrets before communication takes place (This sharing of secrets occurs over another secure channel). Furthermore, these devices can not use public key cryptography. Assuming that underlying cryptographic primi...
What communications security protocols exist that aren't based on PKC?
Let's suppose our device performs ECDH with a fixed, unknown, private key $prv$. It accepts as input any point $Q$ lying in the **proper** subgroup of the **proper** ellipict curve, then computes: $P = prv*Q$ and outputs $P$. An attacker who: - has access to $P$ - can choose any valid $Q$ as input - can c...
Is there any homomorphic encryption scheme which supports addition and power over cipher text ? Paillier is close but it supports addition and multiplication with a constant.
Is there any homomorphic encryption scheme which supports addition and power over cipher text ? Paillier is close but it supports addition and multiplication with a constant. I am getting an output like this: 1 0 1 0 -1 1 My goal is to make -1 positive by any means. As it will encrypted so I cannot know if...
I try to compare the performances (cost of Enc, Dec, ... size of keys, ciphertexts, ...) of IBE schemes using lattices (LWE hardness assumption) or pairing (Diffie-Hellman hardness assumption). I've observed that performances of lattice based schemes are often expressed in terms of $n$ (the dimension of the lattice)...
Is there any homomorphic encryption scheme which supports addition and power over cipher text ? Paillier is close but it supports addition and multiplication with a constant. I am getting an output like this: 1 0 1 0 -1 1 My goal is to make -1 positive by any means. As it will encrypted so I cannot know if...
Is there any homomorphic encryption scheme which supports addition and power over cipher text ? Paillier is close but it supports addition and multiplication with a constant. I am getting an output like this: 1 0 1 0 -1 1 My goal is to make -1 positive by any means. As it will encrypted so I cannot know if...
For $PT\in \mathbb{M}$ and $CT\in \mathbb{C}$, let $\mathbb{F}=\{f|f:\mathbb{M}\rightarrow\mathbb{C}\}$ be the collection of all functions from $\mathbb{M}$ to $\mathbb{C}$. Then AES encryption under key $k$ is one of these functions, say $f_k$, such that $f_k(PT)=CT$. Then, 1. Is there any key $k'$ such that $k\ne...
For given PlainText-CipherText pair how many valid keys will be there in AES?
Is there any homomorphic encryption scheme which supports addition and power over cipher text ? Paillier is close but it supports addition and multiplication with a constant. I am getting an output like this: 1 0 1 0 -1 1 My goal is to make -1 positive by any means. As it will encrypted so I cannot know if...
Is there any homomorphic encryption scheme which supports addition and power over cipher text ? Paillier is close but it supports addition and multiplication with a constant. I am getting an output like this: 1 0 1 0 -1 1 My goal is to make -1 positive by any means. As it will encrypted so I cannot know if...
I try to compare the performances (cost of Enc, Dec, ... size of keys, ciphertexts, ...) of IBE schemes using lattices (LWE hardness assumption) or pairing (Diffie-Hellman hardness assumption). I've observed that performances of lattice-based schemes are often expressed in terms of $n$ (the dimension of the lattice)...
For the symmetric key crypto, generally speaking, you must provide the secret key to the other end for decryption. The same random keys can be generated at the receiver end, if you use same function with same parameters. I am also a bit confused, since you have also used "signature" word in your program. Are you tal...
The [GNU Privacy Guard manual pages][1] have this to say about using the `gpg --gen-random 0|1|2 count` command: > Emit _count_ random bytes of the given quality level 0, 1 or 2. If _count_ is not given or zero, an endless sequence of random bytes will be emitted. If used with `--armor` the output will be base64 enc...
gpg --gen-random quality level: is higher "better"?
In a [previous question][1], I quoted the `--gen-random` entry in the [GPG Man Pages][2]. At the end it says: > PLEASE, don’t use this command unless you know what you are doing; it may remove precious entropy from the system! How does that work? I understand entropy to be the "randomness" of a system (i.e. the a...
How does generating random numbers "remove entropy from your system"?
In the [EdDSA for more curve paper][1] the authors defines keys as: >An EdDSA secret key is a $b$-bit string $k$. The hash $H(k) = (h_0, h_1, ... , h_{2b−1})$ determines an integer $s = 2^n+\sum_{c≤i<n} 2^ih_i$ , which in turn determines the multiple $A = sB$. The corresponding EdDSA public key is $A$. Then, they...
In the paper [Fully Homomorphic Encryption over the Integers](https://eprint.iacr.org/2009/616.pdf), a method is shown for doing homomorphic encryption using only integers. The basic idea is that a bit m is encoded as a large integer c. The principle behind homomorphic encryption through bootstrapping is that after...
In FHE over integers is each bit of the cyphertext encrypted under the new key?
This is a really hard question to answer. The definitive answer can *only* be found in the source code of `gpg`. However I can still answer your question using [a mail I found][1] (from 2013, details may have changed). ---------- > Is 2 "better" (i.e. more random) than 0? Yes, 2 is "better" than 0 and 1.<br...
I'm new to SSL/TLS and I'm staring as a new security researcher. It appears to me that SSL/TLS protocol is needlessly complex for arriving at a shared secret. The complexity results in so many bugs (e.g., downgrade attacks, implementation bugs) What is the reason? If I come up with a simple key-exchange protocol (wi...
Why is SSL/TLS so complicated?
Why do cryptographic hashes need to have a fixed length output? I know that the shallow answer is that an output that varies by key size or file size can leak information somehow, leading to cryptanalysis, but I would like some more intuition as to why this is the case. In the case of using an HMAC, like HMAC-SHA...
Why do cryptographic hashes need to be fixed length?
This is a really hard question to answer. The definitive answer can *only* be found in the source code of `gpg`. However I can still answer your question using [a mail I found][1] (from 2013, details may have changed). ---------- > Is 2 "better" (i.e. more random) than 0? Yes, 2 is "better" than 0 and 1.<br...
So this comes from the professional rumor-mill, and I'm wondering if anyone might either debunk or shed light on this. My understanding is ECC is generally now preferred over RSA simply due to how much more efficiently it operates. After a 2048 key length, RSA simply doesn't return as much value for a longer key le...
A (current or soon-to-be) NIST-reccomended alternative to ECC?
A (current or soon-to-be) NIST-recommended alternative to ECC?
I'm new to elliptic curve cryptography. I just want to know in the case where I take a random number(pvt key) and find its associated public key, does the size of the public key depends upon the size of the random umber chosen?. If so then how is it related? If not then what determines the size of the public key?
Are private and public key sizes of Elliptic curve rlative?
I'm new to elliptic curve cryptography. I just want to know in the case where I take a random number (private key) and find its associated public key, does the size of the public key depends upon the size of the random number chosen?. If so then how is it related? If not then what determines the size of the public ...
Are private and public key sizes of Elliptic curve related?
Would it be interesting to have new stream ciphers whose design is parametrized by a CSPRNG? I.e. to instantiate the stream cipher, you just have to select and plug in any CSPRNG of your choice.
Is it interesting to design stream ciphers parameterized by a CSPRNG?
Is it interesting to design stream ciphers parametrized by a CSPRNG?
How can I alter the plaintext before decryption by changing the IV? I know what the value of the plaintext should be. I also know the value of the IV (initial vector). The IV and the AES block are both 16 bytes long. What I am trying to do is change what the plaintext will be into something meaningful. `"SEND ME...
I am wondering whether $e = 2$ can be used in unpadded RSA... It seems like it is not possible to use it: the value of e needs to be coprime with $tot(n)$. $tot(n) = (p - 1)(q - 1)$ where $p$ and $q$ are prime numbers. The way I see it, there are two scenarios. 1) Neither $p$ nor $q$ are equal to $2$. This mea...
Can anyone let me know the difference between SHA1 and SHA1HMAC algo?
Difference between SHA1 and SHA1HMAC?
Does anyone know what the difference between a one way function is and a hard core predicate? Are they related to each other or different?
what is the difference between one way function and hard core predicate?
I am currently trying to implement the pathORAM algorithm as describe in this paper: https://eprint.iacr.org/2013/280.pdf I think i have a working implementation but im not sure about the behavoir of the stash size. For about the first 3000 or so WRITE calls to the oram, the stash size is usually zero with minor e...
For a given PlainText-CipherText pair how many valid keys are there in AES?
> Q: Why do cryptographic hashes need to have a fixed length output? It depends on what you mean with that. If you mean that they need to have a certain *configured* length then that is not the case. SHA-384 is basically SHA-512 with different vectors and you could view it as a parameterization of the same hash func...
> Q: Why do cryptographic hashes need to have a fixed length output? It depends on what you mean with that. If you mean that they need to have a certain *configured* length then that is not the case. SHA-384 is basically SHA-512 with different vectors and you could view it as a parameterization of the same hash func...
> Q: Why do cryptographic hashes need to have a fixed length output? > I know that the shallow answer is that an output that varies by key size or file size can leak information somehow, leading to cryptanalysis, but I would like some more intuition as to why this is the case. It depends on what you mean with tha...
Assume I have a hash function (such as the one below) and a cipher, and I know that if I repeatedly hash any string over and over again, it will eventually descend to one unique value. Is there any known way to crack a hash function following this pattern? Does this property lend itself to any exploitable vulnerabi...
Assume I have a hash function (such as the one below) and a cipher, and I know that if I repeatedly hash any string over and over again, it will eventually descend to one unique value. Is there any known way to crack a hash function following this pattern? Does this property lend itself to any exploitable vulnerabi...
Seen this? http://www.cvnguyen.ngocnga.net/tech/enigma/ This guy seemed to have it working on GPU back in 2009
For Diffie-Hellman Key Exchange, the used modulus is the same throughout the process. Is it possible to use 2 different for both sides? For example, 1. M^(d1)mod(n1) = A 2. M^(d2)mod(n2) = B 3. B^(d1)mod(n1) = m 4. A^(d2)mod(n2) = m <-- I wonder if the value is equal to m as well? Put 1 into 4; put 2 into ...
I have been working in the vulnerabilities of the Two Time Pad. So i found in a lot of places, StackExchange included saying, that if two plain texts are encrypted (using XOR) with the same key the following is valid: plaintext1 XOR plaintext2 = ciphertext1 XOR ciphertext2 Is there any proof about that, mathe...
p1 xor p2 = c1 xor c2 for two time pad why?
In this paper of J. Baron, et al. [(PDF)][1], simulator always abort the ideal functionality before client outputs its pattern-matching result obtained from the ideal functionality. (See bottom of page 30, and top of page 33) My questions are: 1- Why should simulator always abort? 2- While simulator always abo...
Is it possible for a simulator to always abort?
In this paper of J. Baron, et al. [(PDF)][1], simulator always abort the ideal functionality before client outputs its pattern-matching result obtained from the ideal functionality. (See bottom of page 30, and top of page 33) My questions are: 1. Why should simulator always abort? 2. While simulator always ab...
For Diffie-Hellman Key Exchange, the used modulus is the same throughout the process. Is it possible to use 2 different for both sides? For example, 1. $A \gets M^{d_1} \pmod{n_1} $ 2. $B\gets M^{d_2} \pmod{n_2} $ 3. $m \gets B^{d_1} \pmod{n_1} $ 4. $m' \gets A^{d_2} \pmod{n_2} $ <-- I wonder if $m'$ is equal to...
Does a method exist where a secret is generated so that is is unknown until 3 or more people (predetermined) reach consensus that it should be revealed?
Why is the XOR of plaintexts equal to the XOR of ciphertexts with a two time pad?
I'm working for a professor to build a platform for students to take midterms and finals online. The student downloads the test during class (when the professor makes the test available on the server or passes out the paper copy). However, because of unreliable internet service, we'd like for students to be able to su...
I have a physical unit, e.g. a resistor. I bias it with current and measure the voltage. Let us assume that the fluctuations ($\Delta V=V-<V>$) of this voltage signal are random. Now, $\Delta V$ contains floating numbers with some certain significant digits, say [1.243, 3.567, -3.987, ..., etc]. To test these random nu...
Hardware Random Numbers - How to convert Voltage signal into binary?
SHA-1, SHA-2, and the standardized version of SHA-3 are all sequential. This is impractical for hashing very large files distributed across machines. Any sequential hash can be straightforwardly converted into an efficiently parallelized hash using Merkle trees, but then I lose the standardization, and this is undesi...
Is there a standardized tree hash?
What you want to do depends on your objective. If you only want to make a good RNG from the values you have, so that it passes a Diehard test (passing the test being the objective), that's fine and easy. You do not need to know, or care, about how the values are obtained; essentially, you can take whatever form the ...
What you want to do depends on your objective. If you only want to make a good RNG from the values you have, so that it passes a Diehard test (passing the test being the objective), that's fine and easy. You do not need to know, or care, about how the values are obtained; essentially, you can take whatever form the ...
In some security proofs it is stated that "a protocol securely **realizes** an ideal functionality" while in some others "a protocol securely **implements** an ideal functionality". 1. Is there a meaningful difference or it is just another verb to say a similar thing? 2. Also, is there a difference between *...