instruction
stringlengths
15
30k
May sound stupid to many, but I would like to have some pointers on what exactly is contained inside a private key. I have decent understanding of public/private keys/certificates (have created them many times) and their purpose but would like to take a step back and see what is inside them using a "dump" utility or so...
Basic Question - what exactly is inside a private key?
May sound stupid to many, but I would like to have some pointers on what exactly is contained inside a private key. I have decent understanding of public/private keys/certificates (have created them many times) and their purpose but would like to take a step back and see what is inside them using a "dump" utility or so...
What exactly is inside a private key?
I am looking for an authentication mechanism that works best with low memory, low computing power devices. I came across a paper "[A Practical Zero-Knowledge Protocol Fitted to Security Microprocessor Minimizing Both Transmission and Memory][1]" which is released in 1988. Couldnt find any recent papers. Is it the b...
I am looking for an authentication mechanism that works best with low memory, low computing power devices. I came across a paper "[A Practical Zero-Knowledge Protocol Fitted to Security Microprocessor Minimizing Both Transmission and Memory][1]" which is released in 1988. Couldnt find any recent papers. Is it the b...
El Gamal encryption involves picking $(p,g,b)$ which is our public key. We compute $b=a^x$ $mod$ $p$. Here, $x$ is the private key which we don't know. What are some efficient and strong algorithms today used to finding this $x$? I am currently dealing with numbers such as $b=42-60$ digits long and $p=30-50$. So $b$ is...
El Gamal encryption involves picking $(p,g,b)$ which is our public key. We compute $b=a^x$ $mod$ $p$. Here, $x$ is the private key which we don't know. What are some efficient and strong algorithms today used to finding this $x$? I am currently dealing with numbers such as $b=42-60$ digits long and $p=30-50$. S...
What is *“Implicit Authentication”* in the context of authentication methods? I searched the Web but could not find any article that describes this. If anyone can describe it, that would be a great help.
What is “Implicit Authentication”?
This might sound pretty weird, but I was thinking of a game a person could play alone with a pen and paper. I got this idea where the person would write a random four letter string on a paper, and would have to decode it. There would be a mean to verify if the person is getting closer to the goal or not. So, I decided ...
Would it be possible to create a game where one would need to decrypt a simple encryption?
This might sound pretty weird, but I was thinking of a game a person could play alone with a pen and paper. I got this idea where the person would write a random four letter string on a paper, and would have to decode it. There would be a mean to verify if the person is getting closer to the goal or not. So, I deci...
Caesar cipher? Its a simple substitution cipher where you can solve with just a pen and paper.
Have you considered using a one-time pad scheme if you really want plausible deniability? Each bit of the plaintext is XORed with a bit from the secret random pad. Even without the correct random pad or key, the ciphertext can be decrypted to all possible messages of the given length.
Caesar cipher? Its a simple substitution cipher where you can solve with just a pen and paper. Encryption is done by shifting each plaintext letter, x by n places the alphabet or mathematically, ENCRYPT(x) = (x + n) mod 26. Similarly, the decryption will be the reverse, DECRYPT(x) = (x - n) mod 26. (see wiki http://...
For this cipher, I suggest finding all possible linear approximations by simply enumerating them. If $S$ is the S-box, the bias of the linear approximation $\alpha \cdot x = \beta \cdot S(x)$ is given by $$b(\alpha,\beta) = |2 \Pr[\alpha \cdot x = \beta \cdot S(x)] - 1|.$$ Notice that you can compute $b(\alpha,\...
A problem is given; 1 million users are authenticated with 9-digit PIN codes (e.g. 343534643). The PIN values are stored as hash values in a database. The hash is SHA-256, and is computed as: hash=SHA-256(password|username) An attacker has a graphics card which can compute 500 million hashes in a second. How l...
A problem is given: 1 million users are authenticated with 9-digit PIN codes (e.g. 343534643). The PIN values are stored as hash values in a database. The hash is SHA-256, and is computed as: hash=SHA-256(password|username) An attacker has a graphics card which can compute 500 million hashes in a second. How ...
This question is broken into two sections really: **Symmetry in RSA** I have been analyzing raw RSA and I have noticed some interesting symmetrical properties of the algorithm. Assume the $M$ is a positive integer between $2$ and $N\over2$, ($N$ is the RSA modulus). Then: $M_s = N - M$ $C = M^e (mod N)$ ...
This might sound pretty weird, but I was thinking of a game a person could play alone with a pen and paper. I got this idea where the person would write a random four letter string on a paper, and would have to decode it. There would be a mean to verify if the person is getting closer to the goal or not. So, I deci...
they [claim][1] 3.8 second scrypt cost $900 to brute-force a 6 letter long password. - If we use more cycles then how much brute force cost higher? - What's minimum system requirements to compute such a huge KDF on desktop or mobile? - Is there any formula to estimate its entropy based on CPU cycle time? ...
This question is broken into two sections really: **Symmetry in RSA** I have been analyzing raw RSA and I have noticed some interesting symmetrical properties of the algorithm. Assume that $M$ is a positive integer between $2$ and $N\over2$, ($N$ is the RSA modulus). Then: $$ M_s = N - M \\ C = M^e \pm...
they [claim][1] 3.8 second scrypt cost $900 to brute-force a 6 letter long password. - If we use more cycles then how much brute force cost higher? - What's minimum system requirements to compute such a huge KDF on desktop or mobile? - Is there any formula to estimate its entropy based on CPU cycle time? ...
they [claim][1] 3.8 second scrypt cost $900 to brute-force a 6 letter long password. - If we use more cycles then how much brute force cost higher? - What's minimum system requirements to compute such a huge KDF on desktop or mobile? - Is there any formula to estimate its entropy based on CPU cycle time? -...
The developers [claim][1] that a 6 letter long password hashed with 3.8 second's of scrypt would cost $900 to brute-force. - If we use more cycles, how quickly will the brute force cost increase? - What are the minimum system requirements to compute such a huge KDF on a desktop or mobile? - Is there any formu...
The developers [claim][1] that a 6 letter long password hashed with 3.8 second's of scrypt would cost $900 to brute-force. - If we use more cycles, how quickly will the brute force cost increase? - What are the minimum system requirements to compute such a huge KDF on a desktop or mobile? - Is there any formu...
Given the addivite group (G, +), with |G| = n and generator = g, what are the computations and exchanged messages for Diffie-Hellman? What I tried myself: - Alice chooses a private *a* and sends p (|G|) and g (generator) to Bob. - Alice calculates A = g$^{a}$ mod p (|G|) and sends it to Bob. - Bob chooses a pri...
Given the additive group (G, +), with |G| = n and generator = g, what are the computations and exchanged messages for Diffie-Hellman? What I tried myself: - Alice chooses a private $a$ and sends $p(|G|)$ and $g$ (generator) to Bob. - Alice calculates $A = g^{a} \mod p (|G|)$ and sends it to Bob. - Bob chooses a...
Given the finite cyclic, additive group (G, +), with |G| = n and generator = g, what are the computations and exchanged messages for Diffie-Hellman? What I tried myself: - Alice chooses a private $a$ and sends $p(|G|)$ and $g$ (generator) to Bob. - Alice calculates $A = g^{a} \mod p (|G|)$ and sends it to Bob. ...
Given the finite cyclic, additive group (G, +), with |G| = n and generator = g, what are the computations and exchanged messages for Diffie-Hellman? What I tried myself: - Alice chooses a private $a$ and sends $p(|G|)$ and $g$ (generator) to Bob. - Alice calculates $A = a\cdot g \mod p (|G|)$ and sends it to Bo...
Given the addivite group $(G, +)$ with $|G| = p$ and generator $P$, what are the computations and exchanged messages for Diffie-Hellman? I use order $p$ and assuming $p$ to be prime and the generator as $P$ (as it is used in context of elliptic curve groups - since you need additive groups where the DLP and the CDHP...
Given the additive group $(G, +)$ with $|G| = p$ and generator $P$, what are the computations and exchanged messages for Diffie-Hellman? I use order $p$ and assuming $p$ to be prime and the generator as $P$ (as it is used in context of elliptic curve groups - since you need additive groups where the DLP and the CDHP...
Given the addivite group $(G, +)$ with $|G| = p$ and generator $P$, what are the computations and exchanged messages for Diffie-Hellman? I use order $p$ and assuming $p$ to be prime and the generator as $P$ (as it is used in context of elliptic curve groups - since you need additive groups where the DLP and the CDHP...
Given the additive group $(G, +)$ with $|G| = p$ and generator $P$, what are the computations and exchanged messages for Diffie-Hellman? I use order $p$ and assuming $p$ to be prime and the generator as $P$ (as it is used in context of elliptic curve groups - since you need additive groups where the DLP and the CDHP...
I would still call BGV the state of the art wrt FHE for the following reasons: 1. A public [implementation][1] exists 2. We have [benchmark info][2] 3. Other protocols have successfully applied it with real world use and analysis [here][3] and [here][4] (though presumably the scale-invariant system could replace B...
This question is broken into two sections really: **Symmetry in RSA** I have been analyzing raw RSA and I have noticed some interesting symmetrical properties of the algorithm. Assume that $M$ is a positive integer between $2$ and $N\over2$, ($N$ is the RSA modulus). Then: $$ M_s = N - M \\ C = M^e \pm...
You have to test it on the hardware you'll be using. I tried CryptSharp's implementation with a cost of 262144 and it took about 7 seconds. The reason it costs more is cause of the memory it uses, and my process that was running the Scrypt was eating up 340ish MB. How much of that was from the KDF? Don't know. H...
> The developers [claim](https://www.tarsnap.com/scrypt/scrypt-slides.pdf) that a 6 letter long password hashed with 3.8 seconds of scrypt would cost $900 to brute-force. Very important: This is the cost of finding the password **within a year** by building an ASIC in **2002**. Not so important: There seems to b...
I'm reading [this](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.67.9913&rep=rep1&type=pdf) paper, which on page 3(Section IV.C) presents a Jointly Random Verifiable Secret Sharing Scheme for Elliptic curves. The algorithm makes sense to me save for this part: "Each $P_{i\neq j}$ verifies that his share i...
I'm guessing "No" for good encryption/hash algorithms where being even one bit off key or cycle results in garblygoop. If this is just for the fun of the game, hash the garblygoop after each step and append that hash. foo fooGarbly = encrypt(foo|fooHash) fooGarblyGarbly = encrypt(fooGarbly|fooGarbly...
Suppose I've two clients A and B. Client A encrypt data in CRC mode and get ciphertext. What information client B have to recive from A to decrypt ciphertext? key, IV and counter start value ?
Which data to share in CRT mode?
Assume that *G* is the set Z$_{n}$ = {0 .. n-1} for a 1024 bit integer and + is addition modulo n. Then why would Diffie-Helmann key exchange in this group be insecure?
Suppose I've two clients A and B. Client A encrypt data in CRC mode to get a ciphertext. What information will client B have to receive from A to decrypt the ciphertext? key, IV and counter start value ?
Which data to share in CTR mode?
Suppose we have a cryptosystem homomorphic for addition (say Paillier's). Is there a way to perform a logical OR operation between two binary values (with a *binary* result). We can, of course, obtain the encoded result of addition between two values (by multiplying the encoded values): $Enc(x + y) = Enc(x) \cdot...
To give some foreground information: I acknowledge that I am a cryptography newb and not by any means an expert (and probably never will be). Everything that I make will be crap and not even worth my own weight in 80's hot-pants. In a recent CS class we had several assignments writing and implementing RSA and Diffie...
Suppose I've two clients A and B. Client A encrypt data in CTR (Counter) mode to get a ciphertext. What information will client B have to receive from A to decrypt the ciphertext? key, IV and counter start value ?
Suppose I've two clients A and B. Client A encrypt data in CTR (Counter) mode to get a ciphertext. What information will client B have to receive from A to decrypt the ciphertext? key, IV/nonce and counter start value ?
Suppose Alice and Bob wants to send messages through Sue without revealing to Eve that the exchange took place. Slightly more formally, I don't want Eve to have any advantage telling if Alice is sending spam to random recipients, or if Alice is engaged in an information exchange with Bob. Is this possible? Eve track...
Is this the mathematical equation for the Vigenere Cipher or something else and if something else what is it? Where t is the letter of plain text and n is the position of t within the text and c is the ciphered character. ((t + n) > 25 -> c = (t + n) - 25) ^ ((t + n) <= 25 -> c = (t + n))
Is this the mathematical equation for the Vigenere Cipher or something else and if something else what is it? Where t is the letter of plain text and n is the position of t within the text and c is the ciphered character. *For 't' and 'c' taking a as 1 and z as 26.* ((t + n) > 25 -> c = (t + n) - 25) ^ ((t...
I am currently experimenting with ed25519 and I noticed that on secret key creation, bit 254 is always set and the lower 3 bits are always cleared. I found that bit 254 is always set to protect against timing attacks in this question: http://crypto.stackexchange.com/questions/11810/when-using-curve25519-why-does-the-pr...
Why are the lower 3 bits of curve25519/ed25519 secret keys cleared during creation?
I want to create an online roulette game. Is it OK if the PRNG is seeded only once, when the user starts the game? Or is it recommended to re-seed sometimes during game? Maybe just seeded once a day on the server and every players would get a next random number without re-seeding? How would you do? How do they do i...
When should the seeding of Mersenne-twister happen to make the application secure?
In the Type A curve used in Pairing based Cryptography, what is meant by `sign0` & `sign1` in the expression below? a_param struct fields: exp2, exp1, sign1, sign0, r: r = 2^exp2 + sign1 * 2^exp1 + sign0 * 1 (Solinas prime) q, h: r * h = q + 1 q is a prime, h is a multiple of...
To give some foreground information: I acknowledge that I am a cryptography newb and not by any means an expert (and probably never will be). In a recent CS class we had several assignments writing and implementing RSA and Diffie-Hellman. It was fun but it was exclusively two party encryption. I want to implement mu...
What is the best (thoroughly covering) textbook for application of LFSRs in cryptography? (Beside Cryptography and Data Security by Denning)
What is the best (thoroughly covering) textbook for application of LFSRs in cryptography?
What is the best (thoroughly covering) textbook for application of LFSRs in cryptography? (Beside Cipher Systems by Beker & Piper)
> Alice is color blind. She never knows if her gloves are matched. Her > brother Bob always teases her saying her gloves are mismatched and > she should go change them. Alice wants to know if Bob is telling the > truth about her gloves. > > Assuming Alice only has 2 colors of gloves, how can she design a >...
Zero knowledge proof?
> Alice is color blind. She never knows if her gloves are matched. Her > brother Bob always teases her saying her gloves are mismatched and > she should go change them. Alice wants to know if Bob is telling the > truth about her gloves. > > Assuming Alice only has 2 colors of gloves, how can she design a >...
It is my understanding that PGP has both an integrity check and an authentication check. What vulnerabilities would open up if it didn't have that integrity check? It seems like the authentication check is also basically an integrity check because the authentication would be a signature of the message. So if the mes...
> Alice is color blind. She never knows if her gloves are matched. Her > brother Bob always teases her saying her gloves are mismatched and > she should go change them. Alice wants to know if Bob is telling the > truth about her gloves. > > Assuming Alice only has 2 colors of gloves, how can she design a >...
is there performance differential between them? for example we use PRNG for key generation which is very expensive and CSPRNG for IV/nonce in block ciphers which is fast? what's different between RNGs?
Assuming that we have a message m that is known it is padded with two "01" bytes and then the signature is computed. Can we still use the Known Message Attack to create a signature for message m^2, by multiplying the signature with itself or the padding will ruin everything even it its weak?
Assuming that we have a message m that is known it is padded with two `01` bytes and then the signature is computed. Can we still use the Known Message Attack to create a signature for message $m^2$, by multiplying the signature with itself or the padding will ruin everything even it its weak?
What vulnerabilities would open up if PGP authentication didn't have integrity checking?
I want to create an online roulette game. Is it OK if the PRNG is seeded only once, when the user starts the game, or is it recommended to re-seed sometimes during game? Maybe just seeded once a day on the server and every players would get a next random number without re-seeding? How would you do? How do they do it at...
I want to create an online roulette game. Is it OK if the PRNG is seeded only once, when the user starts the game, or is it recommended to re-seed sometimes during game? Maybe just seeded once a day on the server and every players would get a next random number without re-seeding? How would you do? How do they do it at...
I have made a python code for one DES rotation. Can I use the resulting cipher text as a plain text for the same rotation with the same key? I think the answer is no, I can't do so. But I need to be sure, an explanation will be very helpful.
When trying to prove security of asymmetric signature, for instance for existential (or strong) unforgeability against chosen messages attack, do we need to consider the signer as a possible adversary ? Thank you.
Is there performance differential between them? For example: we use PRNG for key generation which is very expensive and CSPRNG for IV/nonce in block ciphers which is fast? What is the difference between the two types of RNGs?
What is the difference between CSPRNG and PRNG?
Assume that we have a message $m$ of size $n$, and it is padded with two `01` bytes in front. Then the signature $s$ is computed using a private key $ks$. Can we still use the Known Message Attack to create a signature for message $m^2$, by multiplying the signature with itself? Or the padding will ruin this even if ...
Assume that we have a message $m$ of size $n$, and it is padded with two `01` bytes in front. Then the signature $s$ is computed using a private key $ks$. Can we still use the Known Message Attack to create a signature for message $m^2$ by multiplying the signature with itself? Or will the padding stop this despite b...
When trying to prove security of asymmetric signature, for instance for existential (or strong) unforgeability against chosen messages attack, do we need to consider the signer as a possible adversary?
Assume that we have a message $m$ of size $n$, and it is padded with two `01` bytes in front. Then the signature $s$ is computed using a private key $ks$. Can we still use the Known Message Attack to create a signature for message $m^2$ or $pad||m||pad||m$ by multiplying the signature with itself? Or will the padding...
Assume that we have a message $m$ of size $n$, and it is padded with two `01` bytes in front. Then the signature $s$ is computed using a private key $ks$. Can we still use the Known Message Attack to create a signature for message $m^2$ or $pad||m||pad||m$ by multiplying the signature with itself? Or will the padding ...
I have made a python code for one DES rotation. Can I use the resulting cipher text as a plain text for the same rotation with the same key? I think the answer is *no, I can't do so*. But I need to be sure, an explanation will be very helpful.
Can I use the cipher text ouput of only one DES rotation as plaintext to check validity?
I'm currently carrying out a differential attack on the FEAL-4 algorithm, however I have hit a bit of a wall. Basically I attacked the final round first ($K3$) using the differential characteristic of 0x80800000 which yields a differential of `0x02000000` with a probability of $1$. I have found four possibiliti...
My assumption is that S/MIME almost always utilizes certificates as follows: - My certificate can be used to allow people to encrypt messages and send them to me. - My certificate (the same certificate) is used by me to sign messages and send them. Is there an RFC reference that specifies this is a requirement...
If we note $|m|$ the number of bits in the bytestring coding the message $m$, the padding considered is $m\mapsto \tilde m=2^{|m|+8}+2^8\cdot m+1$, and the signature is $m\mapsto\tilde S(m)=S(\tilde m)=\tilde m^d\bmod N$, where $S$ is the textbook/naked RSA signing $m\mapsto m^d\bmod N$. **NO**, we can not derive $\...
If we note $|m|$ the number of bits in the bytestring coding the message $m$, the padding considered is $m\mapsto \tilde m=2^{|m|+8}+2^8\cdot m+1$, and the signature is $m\mapsto\tilde S(m)=S(\tilde m)=\tilde m^d\bmod N$, where $S$ is the textbook/naked RSA signing $m\mapsto m^d\bmod N$. **NO**, we can not derive $\...
If we note $|m|$ the number of bits in the bytestring coding the message $m$, the padding considered is $m\mapsto \tilde m=2^{|m|+8}+2^8\cdot m+1$, and the signature is $m\mapsto\tilde S(m)=S(\tilde m)=\tilde m^d\bmod N$, where $S$ is the textbook/naked RSA signing $m\mapsto m^d\bmod N$. Notice that for any $m$, we can...
If we note $|m|$ the number of bits in the bytestring coding the message $m$, the padding considered is $m\mapsto \tilde m=2^{|m|+8}+2^8\cdot m+1$, and the signature is $m\mapsto\tilde S(m)=S(\tilde m)=\tilde m^d\bmod N$, where $S$ is the textbook/naked RSA signing $m\mapsto m^d\bmod N$. Notice that for any $m$, we can...
If we note $|m|$ the number of bits in the bytestring coding the message $m$, the padding considered is $m\mapsto \tilde m=2^{|m|+8}+2^8\cdot m+1$, and the signature is $m\mapsto\tilde S(m)=S(\tilde m)=\tilde m^d\bmod N$, where $S$ is the textbook/naked RSA signing $m\mapsto m^d\bmod N$. Notice that for any $m$, we can...
I want to create an online roulette game. Is it OK if the PRNG is seeded only once, when the user starts the game, or is it recommended to re-seed sometimes during game? Maybe just seeded once a day on the server and every players would get a next random number without re-seeding? How would you do? How do they do it at...
If we note $|m|$ the number of bits in the bytestring coding the message $m$, the padding considered is $m\mapsto \tilde m=2^{|m|+8}+2^{|m|}+m$, and the signature is $m\mapsto\tilde S(m)=S(\tilde m)=\tilde m^d\bmod N$, where $S$ is the textbook/naked RSA signing $m\mapsto m^d\bmod N$. Notice that for any $m$, we can de...
If we note $|m|$ the number of bits in the bytestring coding the message $m$, the first padding considered is $m\mapsto \tilde m=2^{|m|+8}+2^{|m|}+m$, and the signature is $m\mapsto\tilde S(m)=S(\tilde m)=\tilde m^d\bmod N$, where $S$ is the textbook/naked RSA signing $m\mapsto m^d\bmod N$. Notice that for any $m$, we ...
If we note $|m|$ the number of bits in the bytestring coding the message $m$, the first padding considered is $m\mapsto \tilde m=2^{|m|+8}+2^{|m|}+m$, and the signature is $m\mapsto\tilde S(m)=S(\tilde m)=\tilde m^d\bmod N$, where $S$ is the textbook/naked RSA signing $m\mapsto m^d\bmod N$. Notice that for any $m$, we ...
After reading your question again, I think that a [MIX net](http://en.wikipedia.org/wiki/Mix_network) with at least **two** mixes may solve your problem. Onion routing (in particular [Tor](https://www.torproject.org) as an implementation of its second generation) is designed for *low latency* services, such as web brow...
assume that I have an plaintext $m$ and it is padded with $randompad||00||m$ and then it is encrypted with RSA and a public encryption key so we get $Sm$. Then to assure its integrity we use our signature key and we publish the verification key. The signature $Sign$ is calculated as $01||Sm$ and we send $Sign$ and $Sm$...
If we note $|m|$ the number of bits in the bytestring coding the message $m$, the first padding considered is $m\mapsto \tilde m=2^{|m|+8}+2^{|m|}+m$, and the signature is $m\mapsto\tilde S(m)=S(\tilde m)=\tilde m^d\bmod N$, where $S$ is the textbook/naked RSA signing $m\mapsto m^d\bmod N$. Notice that for any $m$, we ...
I am a student taking cryptography this semester. I was just wondering why can't we use this simple protocol? Alice ----Open Connection--> Bob Alice <-- Cert$_b$--- Bob Alice --- {K$_{AB}$}$_{Bob}$ -->Bob Is there anything wrong with it in terms of security and performance?
Is the following authentication protocol insecure?