instruction
stringlengths
15
30k
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 Assume bob is the server and we're only interested in one way authentication. Is there anythin...
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 the encrypted $Sm$. Then to assure its integrity we use our signature key and we publish the verification key. The input to the signature is this (so again we have padding...
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 the encrypted $Sm$. Then to assure its integrity we use our signature key and we publish the verification key. The input to the signature is this (so again we have padding...
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 the encrypted $Sm$. Then to assure its integrity we use our signature key and we publish the verification key. The input to the signature is this (so again we have pad...
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...
Is a Mersenne-twister cryptographically secure if I truncate the output?
If we note $|m|$ the number of bits in the bytestring coding the message $m$, the first padding considered is $m\mapsto \tilde m=257\cdot2^{|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 ca...
Are those two distributions indistinguishable?
I've got a feeling that I'm going to write this a lot on here: define "sufficient". The question you must answer is "what do you want to protect and how much is it worth to you"? In general, a plain XOR cypher with a key shorter than the *total* plaintext encrypted is pretty weak, and methods for decrypting are more ...
If we note $|m|$ the number of bits in the bytestring coding the message $m$, the first padding considered is $m\mapsto \tilde m=257\cdot2^{|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$ small ...
Consider the following scheme. Alice wants Bob to make some computations for her, but she doesn't want to reveal the data on which he's going to do it. So, she encrypts the data, sends them to Bob, he makes some (Turing-complete) computations on them, and sends an encrypted answer. For example (C++-like pseudocode) ...
I can't get my head around Pollard’s Rho Method for solving discrate log problem I have read in a book: > The basic idea is to pseudorandomly generate group elements of the > form α^i · β^j So,what are i and j > We continue until we obtain a collision of two elements, i.e., until > we have > α^i1 · ...
> Why does finding a collision mean that we have solved the problem? If we find a collision: $\alpha^{i1} \cdot \beta^{j1} = \alpha^{i2} \cdot \beta^{j2}$ then we know that: $\alpha^{i1-i2} = \beta^{j2-j1}$ And so, if we know the order of the group, when we can compute $({i1-i2})^{-1}$, and so, we have: ...
> Why does finding a collision mean that we have solved the problem? If we find a collision: $\alpha^{i1} \cdot \beta^{j1} = \alpha^{i2} \cdot \beta^{j2}$ then we know that: $\alpha^{i1-i2} = \beta^{j2-j1}$ And so, if we know the order of the group, when we can compute $({i1-i2})^{-1}$, and so, we have: ...
> Why does finding a collision mean that we have solved the problem? If we find a collision: $\alpha^{i1} \cdot \beta^{j1} = \alpha^{i2} \cdot \beta^{j2}$ then we know that: $\alpha^{i1-i2} = \beta^{j2-j1}$ And so, if we know the order of the group (which we generally do), then we can compute $({i1-i2})^...
If we note $|m|$ the number of bits in the bytestring coding the message $m$, the first padding considered is $m\mapsto \tilde m=257\cdot2^{|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$ small ...
How to be sure that the man who you're talking with is the one who you think he is? I.e. how to perform authentication in P2P network without central trust server or Certificate Authority? I'm just wondering how can someone make distributed (peer-to-peer) overlay network or chat using DHT for finding peers (like Bit...
How to perfrom authentication without central server in P2P?
Is it possible to tell which encryption algorithm was used, assuming I have a key and a encrypted text? To not complicate the situation let assume we are speaking about symmetric algorithms only. Are there any common methods to discover encryption method?
How you be sure that the man who you're talking with is the one who you think he is? I.e. how to perform authentication in P2P network without central trust server or Certificate Authority? I'm just wondering how can someone make distributed (peer-to-peer) overlay network or chat using DHT for finding peers (like Bi...
How to perform authentication without central server in P2P?
Maybe I've read a wrong newspaper, but recently, with the scandals about the filtrations, I read that NSA (and of course others, I'm not particularly worried about NSA) is able to break ssl and track your data. It is true? What can I do about that? Sorry if it is a silly question but I just know the very basics ...
Can be broken SSL?
But recently, with the scandals about the filtrations, I read that the NSA (and of course others, but I'm not particularly worried about NSA) is able to break SSL and track your data. It is true? What can I do about that, given I do not know much about cryptography?
Is SSL broken? If so, what can I do about it?
Assume that the group $G$ is the set $\mathbb{Z}_{n} = \{0,\ldots, n-1\}$ for a 1024 bit integer and $+$ is addition modulo $n$. Then why would Diffie-Hellman key exchange in this group be insecure?
Is it possible to generate signature only from Public key. See example below where i have valid signature but what if I change hash ? Is then any way to do this? Public key(160 bytes): 024000004800000940000000602000000240000525341310004000001000100B7 373AAC1521A3EF2F5C72DFD3D3F715C56810F2A222AD9179D9DEE...
Is it possible to generate an RSA SHA1 signature only from a public key?
Can $r$ and $s$ from an ECDSA signature be negative numbers?
But recently, with the scandals about the (in)filtrations, I read that the NSA (and of course others, but I'm <del>not</del> particularly worried about NSA) is able to break SSL and track your data. It is true? What can I do about that, given I do not know much about cryptography?
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 Assume bob is the server and we're only interested in one way authentication. Is there anything wrong with...
Is this algorithm demonstrating **proof of work**? This is a algorithm where a "token" is combined with a time stamp and then a cryptographic hash is generated from the combination, next the objective is to find a token whose hash will collide with N digits of the timestamp+token hash. This operation is computation...
Consider the following scheme. Alice wants Bob to make some computations for her, but she doesn't want to reveal the data on which he's going to do it. So, she encrypts the data, sends them to Bob, he makes some (Turing-complete) computations on them, and sends an encrypted answer. For example (C++-like pseudocode) ...
Is this algorithm demonstrating **proof of work**? This is a algorithm where a "token" is combined with a time stamp and then a cryptographic hash is generated from the combination, next the objective is to find a token whose hash will collide with N digits of the timestamp+token hash. This operation is computation...
I'm trying to brute force a 3DES problem given a reduced keyspace (ie I know the first half of the key) but with an unknown IV. The code decrypts to plaintext. My first thought was that I could set the IV to the first 8 bytes of the CT, decode the rest and then substitute back to find the IV. This doesn't seem to work ...
I'm trying to brute force a 3DES problem given a reduced keyspace (ie I know the first half of the key) but with an unknown IV. The code decrypts to plaintext. My first thought was that I could set the IV to the first 8 bytes of the CT, decode the rest and then substitute back to find the IV. This doesn't seem to work ...
In reading about the [Bitcoin][1] protocol I noticed how much its proofs-of-work apparently depend on [uniformity][2] of the SHA-256 hash function. And so presumably do many other applications. How do researchers go about proving uniformity of proposed hash functions? Is it just an empirical matter of running many ...
How can uniformity of hash functions (e.g. SHA-256) be proved?
When sending a block to be decrypted or encrypted, with RijndaelCBC, we input the data to decrypt/encrypt and an IV for syncing and to prevent identical outputs for identical inputs. *This question is regarding to any loopback mode use of AES chipher block using an IV, but my experience is with CBC.* Inside the R...
Using IV buffer after altered inside a Rijndael CBC Encryption/Decryption process as IV for next message?
This cipher shifts the letter that it will shift to, after each shift... I used to play with this when I was a kid. I was thinking about it recently and realized that it wasn't as simple as I thought. Here's the description: > The second number makes the code much harder to break. It changes the number of letters...
Like people always say: *“Attacks only get worse…”* — which is why I'm asking early. I have been reading the paper [“RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis”](http://www.tau.ac.il/~tromer/papers/acoustic-20131218.pdf) published December 18, 2013 by Daniel Genkin, Adi Shamir, Eran Tromer. In sh...
Is any crypto-scheme secure against acoustic cryptanalysis to prevent successfull attacks like the ones on 4096-bit RSA encryption keys?
Is any crypto-scheme secure against acoustic cryptanalysis to prevent successful attacks like the ones on 4096-bit RSA encryption keys?
I haven't read the paper, but https://www.cs.tau.ac.il/~tromer/acoustic/ mentions that GnuPG's RSA implementation was patched to avoid the current attack. I got the impression that this was a problem along the lines of implementing AES without cache timing attacks, not "RSA is ruined forever". (Should someone conver...
Like people always say: *“Attacks only get worse…”* — which is why I'm asking early. I have been reading the paper [“RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis”](http://www.tau.ac.il/~tromer/papers/acoustic-20131218.pdf) published December 18, 2013 by Daniel Genkin, Adi Shamir, Eran Tromer. In sh...
Can we ensure the secure of a crypto-algorithm and/or -scheme against acoustic cryptanalysis?
What happen to entropy after hashing? Suppose if you have a key with entropy *k* can our entropy be increased by hashing it?
Like people always say: *“Attacks only get worse…”* — which is why I'm asking early. I have been reading the paper [“RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis”](http://www.tau.ac.il/~tromer/papers/acoustic-20131218.pdf) published December 18, 2013 by Daniel Genkin, Adi Shamir, Eran Tromer. In sh...
Can we ensure the security of a crypto-algorithm and -implementaton against acoustic cryptanalysis?
Like people always say: *“Attacks only get worse…”* — which is why I'm asking early. I have been reading the paper [“RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis”](http://www.tau.ac.il/~tromer/papers/acoustic-20131218.pdf) published December 18, 2013 by Daniel Genkin, Adi Shamir, Eran Tromer. In sh...
Like people always say: *“Attacks only get worse…”* — which is why I'm asking early. I have been reading the paper [“RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis”](http://www.tau.ac.il/~tromer/papers/acoustic-20131218.pdf) published December 18, 2013 by Daniel Genkin, Adi Shamir, Eran Tromer. In sh...
What happens to entropy after hashing? Suppose you have a key with entropy $k$. Can the entropy of $k$ be increased by hashing it?
What happens to entropy after hashing?
What happens to entropy after hashing? Suppose you have a key with entropy $k$. Can entropy $k$ be increased by hashing the key it?
What happens to entropy after hashing? Suppose you have a key with entropy $k$. Can entropy $k$ be increased by hashing the key?
Lets say that I have a server which encrypts information at the server side using ECB mode with the blocksize of 16. If the server appends data that I control with a secret and sends back the ciphertext, it is possible for me to figure out what the secret is, by bruteforcing one character at a time. Now lets conside...
Yes, this is easy enough to exploit. Start by sending any 15-byte message $m$, and then 256 different 16-byte messages consisting of $m$ followed by each of the 256 possible values of the last byte. One of the encrypted 16-byte messages will have the same first ciphertext block as the encryption of $m$. Find out...
ti might be common but if we had to solve an equation like this $m=s^{e}$ mod $n$ where $m,e,n$ are known. How can we find $s$. What optimisations could be applied? And what would the complexity of finding $s$ be relative to $n,e$? Thank you
It might be common, but if we had to solve an equation like this $m=s^{e}$ mod $n$ where $m,e,n$ are known. How can we find $s$. What optimisations could be applied? And what would the complexity of finding $s$ be relative to $n,e$? Thank you
I am looking for an adequate protocol for public key decryption, which would allow $n$ parties to jointly decrypt a cipher text. The usage scenario for such a protocol would be a [mixnet][1] that wouldn't require the sender to know all mixes in advance. The requirements are: - There is a single externally known lon...
It might be common, but if we had to solve an equation like this $m=s^{e}$ mod $n$ where $m,e,n$ are known. How can we find $s$. What optimisations could be applied? And what would the complexity of finding $s$ be relative to $n,e$? Moreover, if we use GNFS or anything similar what does the complexity express exactly....
I am looking for an adequate protocol for public key decryption, which would allow $n$ parties to jointly decrypt a cipher text. The usage scenario for such a protocol would be a [mixnet][1] that wouldn't require the sender to know all mixes in advance. The requirements are: - There is a single externally known lon...
**Yes**, there is an attack that has a fair chance of success, like $2^{-8}$ per $Sign$ (and perhaps $Sm$) submitted; or even more depending on exactly how the encryption padding is removed/verified. The attack does not require submitting a message for signature to a party knowing the signature private key. I consider ...
**Yes**, there is an attack that has a fair chance of success, like $2^{-8}$ per $Sign$ (and perhaps $Sm$) submitted; or even more depending on exactly how the encryption padding is removed/verified. The attack does not require submitting a message for signature to a party knowing the signature private key. I consider ...
**Yes**, there is an attack that has a fair chance of success, like $2^{-8}$ per $Sign$ (and perhaps $Sm$) submitted; or even more depending on exactly how the encryption padding is removed/verified. The attack does not require submitting a message for signature to a party knowing the signature private key. I consider ...
I've learned that public key encryption is based on the problem of Discrete Log (as regard to group theory) which believed to be hard. But, can we say that it doesn't matter on which problem our public encryption rely and say that it couldn't be CPA secure anyway?
Can we say that if $P=NP$ there is no CPA secure public key encryption?
Actually, it's not true that public key encryption is based on Discrete Log; the ones in common use (DH, ECDH, ECDSA) are (and even RSA can be viewed as "based on Discrete Log", at least from the standpoint of "if you can solve the Discrete Log modulo a composite, you can break RSA"). However, we do have a number of...
If this is the wrong place to ask, then sorry. I'm wondering how a backdoor in a random-number generator, as rumored to have been placed there by the NSA, actually compromises the security of thing like VPNs. What I understand is that, if such a backdoor exists, then after observing a certain number of pseudorandom...
How exactly does a backdoor into the RNG enable an attacker to break encryption protocols?
I'm wondering how a backdoor in a random-number generator (as rumored the NSA have placed), actually compromises the security of thing like VPNs. What I understand is that, if such a backdoor exists, then after observing a certain number of pseudorandom bits, the attacker can then predict the rest of the pseudorando...
How does a backdoor in the RNG enable an attacker to break encryption protocols?
I'm wondering how a backdoor in a random-number generator (as rumored the NSA have placed), actually compromises the security of things like VPNs or TSL/SSL. What I understand is that, if such a backdoor exists, then after observing a certain number of pseudorandom bits, the attacker can then predict the rest of the...
I was trying to implement zero knowledge protocol for authentication based on the paper "[A Practical Zero-Knowledge Protocol Fitted to Security Microprocessor Minimizing Both Transmission and Memory][1]". In that, the first step is "each security device with identity $I$ receives an authentication value $B$ (The in...
From [this question][1] I understand that, for a block cipher, using CBC is better than ECB. It seems that if one only has part of the cipher text, then decryption is difficult because the decryption depends on the previous cipher block. But, what if one does have the whole cipher text? Is CBC then better? [It seems...
What are the advantages of CBC over ECB?
Premises - please check it and critique if necessary: If factoring the products of large numbers suddenly becomes simple, PKI goes up in smoke. Is this correct? If it is correct, it seems to me that the only alternative is a return to shared secret schemes...is there anything serious out there that still reli...
What's the alternative should PKI collapse?
Premises - please check it and critique if necessary: *If factoring the products of large numbers suddenly becomes simple, PKI goes up in smoke.* Is this correct? If it is correct, it seems to me that the only alternative is a return to shared secret schemes… is there anything serious out there that still rel...
Sorry, the question is not easy to state (or wasn't for me, anyhow). So I'm writing a very flexible format for security. It allows for full choice of cipher, key size, and so on, along with key confirmation and derivation. All of this is communicated in objects with Protocol Buffers serialisation. Now, I get that I ...
With Encrypt-then-MAC, and flexible protocols, do I need to authenticate the authentication?
I'm trying to brute force a 3DES problem given a reduced keyspace (ie I know the first half of the key) but with an unknown IV. The code decrypts to plaintext. My first thought was that I could set the IV to the first 8 bytes of the CT, decode the rest and then substitute back to find the IV. This doesn't seem to work ...
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...
The usual case to distinguish a pseudorandom function from a random function is to assume that the adversary can choose the plaintext blocks. Is there another case (game) in which the adversary can not choose the plaintext blocks ?
The verification algorithm given in blind signature. Should it work for both 1. Original message and the signature on it 2. Blinded message and the signature on it. If yes, then how can we verify if the verification algorithm takes in a parameter which is computed during unblinding stage??
I am trying to calculate an `x`, such that `t = g^x mod p` (I need to crack a weak elgamal encryption for university). I found gdlog, but I cant figure out how I can use the input to calculate my `x.` Here is what we got (from gdlogs example code): p:1000000000000000000000000000057 //prime number, modulu...
I am looking for an adequate protocol for public key decryption, which would allow $n$ parties to jointly decrypt a cipher text. The usage scenario for such a protocol would be a [mixnet][1] that wouldn't require the sender to know all mixes in advance. The requirements are: - There is a single externally known lon...
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...
Let $\#G$ denote the number of elements in the group. In your particular case, $\#G = \varphi{}(n)$ (and even $\#G = n-1$ if $n$ is prime). Let $\xleftarrow{\$}$ denote a uniformly random sampling from a finite set of elements. Furthermore, $\mathbb{Z}_m$ denotes the set of non-negative integers smaller than $m$ and $\...
There are three ways a RNG can fail 1. Insufficient randomness in the input 2. Losing randomness as a result of the random transformation 3. Leaking bits through an intentional or unintentional side channel Each fail weakens things. A backdoor in a random number generator is like actively implementing such a f...
There are three ways a RNG can fail 1. Insufficient randomness in the input 2. Losing randomness as a result of the random transformation 3. Leaking bits through an intentional or unintentional side channel Each fail weakens things. A backdoor in a random number generator is like actively implementing such a f...
Consider the following simple cipher: $$c_1 = S(m_1 \oplus k_1) \oplus k_2$$ Where $S$ is S-box, $m_1$ - 16-bit plain text, $k_1$ and $k_2$ is two parts of 16-bit key. If S-box is standard then this cipher is quite easy to hack by differential analysis. But consider $m_1$ as two-dimensional array 4x4 bits and S-box a...
Consider the following simple cipher: $$c_1 = S(m_1 \oplus k_1) \oplus k_2$$ Where $S$ is S-box, $m_1$ - 16-bit plain text, $k_1$ and $k_2$ is two parts of 16-bit key. If S-box is standard then this cipher is quite easy to hack by differential analysis. But consider $m_1$ as two-dimensional array 4x4 bits and S-b...
I have been reading about attacks against RSA Digital Signature in a book ![enter image description here][1] [1]: https://i.stack.imgur.com/L5h9S.png > The attacker chooses the signature first and then computes the > message. As a consequence, he cannot control the semantics of the > message x wh...
I'm developing a security/encryption software and I'm using AES CFB (block size: 16 and key size: 32 bytes). I want to know, if I also keep IV (32 bytes) secret like the key itself (32 bytes), would it add to security or not? Encryption key and IV will not be specified by user, it will be generated and then encry...
Consider the following simple cipher: $$c_1 = S(m_1 \oplus k_1) \oplus k_2$$ Where $S$ is S-box, $m_1$ - 16-bit plain text, $k_1$ and $k_2$ is two parts of 16-bit key. If S-box is standard then this cipher is quite easy to hack by differential analysis. But consider $m_1$ as two-dimensional array 4x4 bits and S-b...
Let's assume that Bob, at some point in time, has created a PGP (key length and other parameters are not relevant at this point). For some reason, he has chosen a very poor passphrase, for instance `lemon`. Some time later, Bob realises his poor choice and decides to change his passphrase to something much more secur...
Can the passphrase of a PGP key be deduced from an old backup?