instruction
stringlengths
15
30k
Take a cyclic group of prime order. The Schnorr-protocol for proving knowledge of the discrete logarithm of some group element is honest-verifier zero-knowledge, meaning that if the verifier chooses his challenge randomly, then he learns nothing about the log. However, I'm looking for a zero-knowledge proof of knowl...
## background In [[Shoup2004]], Victor Shoup synthesizes the 'sequence of games' technique for proving security properties: Roughly it consists in a sequence from game_0 to game_n, game_0 consisting in the property. You prove that for any two games the two probability of success are negligibly close, then you prove...
Fault-based transition for crypto proof (a la Shoup) with big probability of fault - does it work?
Take a cyclic group of prime order. The Schnorr-protocol for proving knowledge of the discrete logarithm of some group element is honest-verifier zero-knowledge, meaning that if the verifier chooses his challenge randomly, then he learns nothing about the log. However, I'm looking for a zero-knowledge proof of knowl...
`AES-GCM` seems to be used by everyone but I never seen even one post about `Salsa20-GCM`. Is it secure? Wikipedia mentions that GCM uses a block cipher, but also that it uses CTR mode. I am seeking an authoritative citation that I can reference in my project documentation, but personal opinions and arguments are w...
Salsa20-GCM composition secure?
What is the difference between soundness in ZKPoK and special soundness for sigma proofs?
How to decrypt this file that has been encrypted?
While solving a CTF challenge online, I came across a situation where I needed to decrypt a `'.enc'` file that has been encrypted using someone's public key. The corresponding public key `'.pem'` file was provided to me. I solved almost all other CTF challenges except this one and it has been bugging me since. I solved...
How to decrypt a '.enc' file that has been encrypted with RSA using a public key?
I understand what substitution-permutation networks look like. I understand what Feistel networks and Feistel-like networks look like. A Feistel network or a Feistel-like network features substitution and permutations, so why is it considered distinct from an SP-network?
Why is a Feistel network not a type of substitution-permutation network?
As part of an experiment, I was given a .enc RSA (encrypted) file that was most likely generated using openssl. I had the public key, I factored it, obtained the private exponent, and decrypted the .enc file in chunks of 64 bit. What I got as a result, was nonsense hex. I was supposed to get a password or secret key. ...
I'm pretty sure there are no papers about this.<br> I'm also pretty sure that no of the well-known cryptographers (Bernstein, Fergueson, Schneier, ...) will answer here.<br> However I can provide you an answer that is very likely to be correct.<br> FIRST: this is a severe abuse of the GCM construction and should b...
My software uses a 3rd party encryption appliance. One of the capabilities they allow is for the client software to supply an IV while doing CBC encryption. **Why would they not generate a random number on their own to use as an IV?** What is the advantage of letting the client specify an IV? I can only think o...
Are there any Homomorphic Encryption(HE) schemes that result in noisy answers ? By noisy i mean , the answers could be approximately near the actual answers by noise factor $\epsilon$. For example , we could get $dec_{sk}(eval_{pk}({enc_{pk}(5) + enc_{pk}(10))) = 16}$ where as the real answer is 15. Here $enc,eval,...
Are there any noisy fully homomorphic encryption schemes?
Are there any noisy homomorphic encryption schemes?
The project I'm working on requires me to find a way to create a unique key based on data stored in a table. The table in question consists of x columns and y rows. In order to create the key I want to hash the data using md5 in the following way: "|" || md5[(x_1,y_1)] || "|" || md5[(x_2,y_1)] || "|" || md5...
E=encrypt(K,M) - is message M encrypted with key K gives encrypted text E M=decrypt(K,E) - is encrypted text E decrypted with key K gives message M KCA−pub,KCA−priv - is the private-public key pair for a certificate authority, such as Verisign D=MD(F) - MD is a message digest function, applied to file F giving...
How does the certificate authority generate a signature F?
Better is a subjective term. However for the choice between ECB and CBC, the choice should be CBC for almost all situations. Although ECB and CBC are modes of operation of a block cipher, you could also turn this way of thinking around and see the block cipher as a configuration option for the mode of operation. The...
I'm writing a program that can encrypt a file using AES cfb128 (using Openssl and C++). The scenario of the program is this: - Person A visits computer, encrypts a file they make, takes away a key (on USB stick?) - Person B visits computer and is unable to decrypt encrypted file - Person A comes back and dec...
## background In [[Shoup2004]], Victor Shoup synthesizes the 'sequence of games' technique for proving security properties: Roughly it consists in a sequence from game_0 to game_n, game_0 consisting in the property. You prove that for any two games the two probability of success are negligibly close, then you prove...
So I am making an application that basically creates strings that must be encrypted before they are stored on a user's device. If the user blindly starts running the application without creating a password before hand <b>OR</b> they cannot come up with a long, strong password, would this method be appropriate? (Languag...
The signature format for ECDSA signatures can be encoded using ASN.1 integers according to X9.62 or it can comprise of two integers with the same size as the key size. In case the X9.62 format is used is it mandatory to use DER encoding (distinguished encoding rules) of the result, or is BER encoding (basic encoding...
I've developed one here: https://github.com/mjethani/typo In a nutshell, every 4 bits of the secret message is encoded as a typo in the stegotext. The value of the typo is the 4 least significant bits of the first byte of its SHA-256 hash. For example, the typo "infirmation" (information) carries the value 0xE (0...
If we have encryptions of additive and multiplicative identities in the corpus of cipher text of a deterministic fully homomorphic encryption (FHE) scheme guess we can break it. If the FHE scheme is deterministic and works over integers and if the corpus of cipher text has $enc(1),enc(0)$ where $1$ being multiplicat...
If a cipher has mixed operations, e.g $\oplus$ (addition mod $2$), and addition modulo $2^8$. How we we going to express them mathematically? Thanks in advance!
Yes, your understanding is correct. It is well-known that homomorphic encryption schemes are vulnerable to cipher text attacks if they are deterministic. See, for example, the section 2.4 of the paper [A Survey of Homomorphic Encryption for Nonspecialists][1] Consider that the attacker has a value $c_1$ that is k...
If we have encryptions of additive and multiplicative identities in the corpus of cipher text of a deterministic fully homomorphic encryption (FHE) scheme, I guess we can break it. If the FHE scheme is deterministic and works over integers and if the corpus of cipher text has $enc(1),enc(0)$ where $1$ being multipli...
Encrypt entire payload or only sensitive parts of payload?
Encrypt entire payload or only confidential parts of payload?
Using RSA for signing & verification, is there a way to take a valid signature for an unknown message, and for someone *else* to generate a valid signature using a different key against the valid signature, given knowledge of the original public key? First, let me describe how I understand signing/verification with ...
There is of course but because of carry bits there will be data-dependent "nonlinear" terms. If I do it for 2 bits you can get the idea. It gets unwieldy but you can easily write code to do it for longer bitlengths. The list below is an XOR table expressed as integers. $$ \underline{\oplus~~| ~~ 0 ~~ 1~~2~~3} $$ ...
Sorry for the late answer, I got busy... So, you know that $\mathsf{Gen}$ is a probabilistic algorithm. What's a probabilistic algorithm? It's an algorithm which, during its execution, can make some random choices, which can be modeled as coin tosses. In programming terms, the algorithm can use a special coin-tossin...
Let's assume that I generate a high entropy AES master key (through /dev/random for example) and I want to derive it with a fixed-length serial number (12345 for instance). The derived key is used to encrypt and authenticate files that can be read by a specific device only (with said serial number). Therefore, to crea...
It seems there is a difference between "streaming" in cryptographic sense (as in CTR) and "streaming" in general programming sense (as in "accept a file larger than RAM from socket and save it on disk"). It shows when people try to apply AEAD (or in general authenticated encryption) schemes to something like Java's Inp...
Is it possible to combine true streaming with AEAD?
Why is this the inverse of a Enigma Machine rotor?
The book [Algebraic Cryptanalisys][1] speaks about transforming a symmetric scheme in a system of polynomial equations and solving these equations to break the scheme. But, there is no way to do the same with *asymmetric* schemes? Is it impossible to apply the same techniques to this kind of scheme? [1]:...
It is known that RSA has the multiplicative property $E(m_1) \cdot E(m_2) = E(m_1 \cdot m_2)$ because $m_1^e \cdot m_2^e = (m_1 \cdot m_2)^e \pmod n$ But how can this property be used to break the RSA system? What are the attacks that use this property?
The book [Algebraic Cryptanalysis][1] (Bard, G.V.; Springer, 2009) speaks about transforming a symmetric scheme into a system of polynomial equations and solving these equations to break the scheme. But is there no way to do the same with *asymmetric* schemes? Is it impossible to apply the same techniques to this k...
In cases where a large complex data structure contains elements that are a mix of confidential and not-so-confidential data, what would be the pros & cons of: 1. encrypting the entire structure with one key; or 2. encrypting only the parts of the data structure that contain confidential data?
Of course, it is possible. It is possible to take a public key encryption algorithm which takes the private key and the known ciphertext into the known plaintext, convert that into a set of equations in $GF(2)$ with the private key as unknown variables, and solve for those unknown variables. Alternatively, you can ta...
Yes there are such schemes. However they aren't standardized by any means yet.<br> The schemes I'm talking about take part in [CAESAR-competition][1].<br> If you wait ~1 week (hopefully) you'll see if any mode / cipher makes in in the second round.<br> [This paper][2] provides you with a good overview over the ci...
I am studying Multi-Tenancy vs. Virtualization, and I got thinking about randomness, true randomness, virtualization etc, and I couldn't find anything on it. From what I gather, `/dev/urandom` is just as good as `/dev/random` and you should use it instead, BUT... it doesn't bloc if you "don't have enough entropy"......
Low entropy for PRNGs is bad.<br> If you set up a VM by automatized software, you won't have entropy for your PRNG which is not good.<br> What would be the risk level? Weak cryptographic keys (pretty bad if this is f.ex. a SSH log-in key or someting like this). Seeding the VM with entropy rich data from the host...
I have a vector $e \in Z^{m}$, now I want to encrypt it by using LWE (learning with error - http://en.wikipedia.org/wiki/Learning_with_errors) instead of using Because in LWE, we have to encrypt of a bit ${0,1}$. How can I encrypt a vector $e \in Z^{m}$? Thank you very much.
I have a vector $e \in Z^{m}$, now I want to encrypt it by using LWE ([Learning With Errors][1]) instead of using Because in LWE, we have to encrypt of a bit $\{0,1\}$. How can I encrypt a vector $e \in Z^{m}$? Thank you very much. [1]: http://%20http://en.wikipedia.org/wiki/Learning_with_errors
I have a vector $e \in Z^{m}$, now I want to encrypt it by using LWE ([Learning With Errors][1]). Because in LWE, we have to encrypt of a bit $\{0,1\}$. How can I encrypt a vector $e \in Z^{m}$? Thank you very much. [1]: http://%20http://en.wikipedia.org/wiki/Learning_with_errors
I think you will not find any scheme that works over $Z$. But, if you want to work over $Z_t$, you just have to choose a LWE-based encryption scheme that encrypts non-binary messages, and there is a lot of them! For example, the paper [ML Confidential][1] uses one scheme like that (non-binary messages) to perfo...
Sorry for the late answer, I got busy... So, you know that $\mathsf{Gen}$ is a probabilistic algorithm. What's a probabilistic algorithm? It's an algorithm which, during its execution, can make some random choices, which can be modeled as coin tosses. In programming terms, the algorithm can use a special coin-tossin...
There is of course but because of carry bits there will be data-dependent "nonlinear" terms. If I do it for 2 bits you can get the idea. It gets unwieldy but you can easily write code to do it for longer bitlengths. The list below is an XOR table expressed as integers: $$ \begin{array}{c|ccc} \oplus & 0 & 1 & 2 & ...
Sorry for the late answer, I got busy... So, you know that $\mathsf{Gen}$ is a probabilistic algorithm. What's a probabilistic algorithm? It's an algorithm which, during its execution, can make some random choices, which can be modeled as coin tosses. In programming terms, the algorithm can use a special coin-tossin...
I have just started MSc in Computer Security. I didn't study probability before. Now, I have some short time to complete my MSc semester. What are the minimum topics from 'Probability' do I need to know to complete my Cryptography course?
How much of Probability do I need to know to study Cryptography?
The password is entered by the user and the key is processed locally. Neither the password nor the key will be stored, only used and forgotten (but hopefully not by the user). Is SHA256 by itself strong enough for this purpose? Do I really need a salt in this case? I've looked around Google and other StackExchan...
What is the proper way to generate a fixed length key from a variable length password?
This might sound really dumb but why is it bad/insecure too use the same key twice on One-time-pad? **Question:** Why and how does using a key twice make it insecure. (in One-time-pad).
OTP - Why not reuse key?
This might sound really dumb but why is it bad/insecure too use the same key twice on One-time-pad? **Question:** Why and how does using a key twice make it insecure. (in One-time-pad). **EDIT:** I have read the "maybe" duplicated ones but they did not have the same perspective as this quesiton.
I think you will not find any scheme that works over $Z$. But, if you want to work over $Z_t$, you just have to choose a LWE-based encryption scheme that encrypts non-binary messages, and there is a lot of them! For example, the paper [ML Confidential][1] uses one scheme like that (non-binary messages) to perfo...
This might sound really dumb but why is it bad/insecure too use the same key twice on One-time-pad? **Question:** Why and how does using a key twice make it insecure. (in One-time-pad). **EDIT:** I have read the "maybe" duplicated ones but they did not have the same perspective as this quesiton. **EDIT:** But ...
OTP - Why not reuse key? EDITED!
I am learning about how the Enigma Machine works and I found [this example][1] of one letter being encrypted by an Enigma Machine. It shows the letter **"G"** going through three rotors and then it goes into the reflector, then back into the inverse rotors. This is where I get confused. The rotors are Rotor I...
I have already asked a similar question and now I can continue to this question about adding a "extra key" = IV. My last question was about reusing key in OTP (One-Time-Pad). Now this question is about reusing same key BUT adding a "extra key" = IV. **Question:** Is this algorithm below safe to use? (Reusing key ...
OTP - Reuse key BUT add IV, is it secure enough?
I am doing some research for which I intend to insert some (external) function in different cryptographic hash functions and I would like to analyse how the insertion of this extra code in the hash function affects its performance, especially its speed in hashing and any other performance measures. I came across [SU...
(Simple) Tool for analysing performance (speed in particular) of cryptographic hash function?
I am doing some research for which I intend to insert some (external) function in different cryptographic hash functions and I would like to analyse how the insertion of this extra code in the hash function affects its performance, especially its speed in hashing and any other performance measures. I came across [SU...
I am attempting to implement probabilistic fair exchange described in [Probabilistic Non-Repudiation without Trusted Third Party](http://www.researchgate.net/profile/Olivier_Markowitch/publication/2370420_Probabilistic_Non-Repudiation_without_Trusted_Third_Party/links/53e006fa0cf2a768e49ef326.pdf). A secures a messa...
I have a vector $e \in Z^{m}$, now I want to encrypt it by using LWE ([Learning With Errors][1]). Because in LWE, we have to encrypt of a bit $\{0,1\}$. How can I encrypt a vector $e \in Z^{m}$? Thank you very much. [1]: http://en.wikipedia.org/wiki/Learning_with_errors
I was trying to understand one way signature chaining on message by [saxena and soh][1]. As the message is passed from one user to other, every user can combine their signature to create one single signature for a message m. This aggregated signature when passed along with public key of all users who have signed the me...
suppose $ g: \{0,1\} ^{l}\rightarrow \{0,1\} ^{l} (l\in \{0,1\}^{*})$ is a pseudorandom function. Is $f$ (which is defined as below )necessarily a pseudorandom function? $$ f(x)=g(x+1 \quad mod \thinspace 2^{|l|} )$$
Is f necessarily a pseudorandom function?
Let $l\in\mathbb N$ and suppose $$g\colon\;\{0,1\}^l\to\{0,1\}^l$$ is a pseudorandom function. Is $f$, defined as below, necessarily a pseudorandom function as well? $$f(x)=g((x+1)\bmod2^l)$$
Is $f\colon x\mapsto g(x+1)$ necessarily a pseudorandom function?
If, m: message, M: messagespace, k: key, K: keyspace, c: cipher, C: cipherspace, and, $E_k$: encryption function. $E_k$(m) = c m $\epsilon$ M m* $\epsilon$ M k $\epsilon$ K c $\epsilon$ C Then, what do the following notations actually mean in plain English? \begin{eqnarray*}P[m=m^* | E_k(m) = c] = ...
What do these notations mean, if we read those in English?
What I'm talking about is a hand cipher which uses phonemes instead of individual characters and pictograms instead of the usual shuffling/substitution methods (e.g Caesar, Solitare, Vignere). The pictograms would be composite images made from smaller images that represent each phoneme in the word. These images are ...
Would a pictographic, phoneme-based, hand cipher be difficult to crack with computer crypt-analysis?
I'm trying to generate a bunch of pseudo-random keys for AES using PBKDF2, where the AES ciphers will be used in CTR mode as pseudo-random number generators. My goal is to create a 2-dimensional array, where each entry is a pseudo-random sequence generated by a separate PRNG. The reason for using separate PRNGs is simp...
***EDIT: REUSING KEY IS SECURE! http://crypto.stackexchange.com/questions/24918/otp-reusing-key-is-secure-proved*** I have already asked a similar question and now I can continue to this question about adding a "extra key" = IV. My last question was about reusing key in OTP (One-Time-Pad). Now this question is ab...
***EDIT: REUSING KEY IS SECURE! http://crypto.stackexchange.com/questions/24918/otp-reusing-key-is-secure-proved*** This might sound really dumb but why is it bad/insecure too use the same key twice on One-time-pad? **Question:** Why and how does using a key twice make it insecure. (in One-time-pad). **EDIT:...
If m: message, M: message space, k: key, K: keyspace, c: cipher, C: cipher space and $E_k$: encryption function, such that $E_k(m) = c,\ m,m^* \in M,\ k\in K,\ c\in C.$ Then, what do the following notations actually mean in plain English? ![enter image description here][1] [1]: https://i.stack.imgur.com/ibF64...
My first question is, is the following equation correct for One Time Pad encryption? $$P[E_k(m) = c] = \frac{ \sum_{m_ i\in M} \sum_{k_ i\in K} P[E_ {k_ i}(m_ i) = c_ i] } {|M|.|K|} $$ And, my second question is, how do we get that?
How can we get the following equation in case of a One Time Pad?
My first question is, is the following equation correct for One Time Pad encryption? $$P[E_k(m) = c] = \frac{ \sum_{m_ i\in M} \sum_{k_ i\in K} P[E_ {k_ i}(m_ i) = c_ i] } {|M|.|K|} $$ And, my second question is, why do we get that?
Why do we get the following equation in case of a One Time Pad?
Why we use Mix Columns and Shift Rows in AES? FOr example, if i want implement an AES algorithm without Mix Columns and Shift Rows what is the difference in the ciphertext?
Without [Mix Columns][1], every byte of the ciphertext would not depend on every byte of the plaintext, but only on the one byte at the same position. This would fully break AES, because we don't have an [avalanche effect][2] on the whole text anymore. Without the [Row shifting][3], every column of plaintext would o...
I have a silly question, but I don't know a solution, so I need to question. Assume, with a algorithm $TrapGen(1^\lambda)$, it generates $A\in\mathbb{Z}_q^{n\times m}$ with a basis $B \in\mathbb{Z}_q^{m\times m}$ for $\Lambda^\perp(A)$. With ISIS problem (inhomogoneous small integer solution), if $SIS_q,m,2r\sqrt...
If m: message, M: message space, k: key, K: keyspace, c: cipher, C: cipher space and $E_k$: encryption function, such that $E_k(m) = c,\ m,m^* \in M,\ k\in K,\ c\in C.$ My first question is, is the following equation correct for One Time Pad encryption? $$P[E_k(m) = c] = \frac{ \sum_{m_ i\in M} \sum_{k_ i\in K} ...
The creation of the prekeys for Serpent works by XORing some previous values with a counter and a fixed value. Every word is 32 bits big and 4 words form a round key (after applying a S-Box, but this shall not be part of this question). The original raw key of 256 bit is $w_{-8}$ to $w_{-1}$, $\phi$ is a constant te...
Is the key schedule of Serpent a circle?
As far as I know, in the development of ANSI X9.82, there was consideration of OFB_DRBG, a pseudorandom number generator based on block ciphers like CTR_DRBG, but it appears to have been rejected of left out of the final publication, much like MS_DRBG. Is CTR_DRBG safer than OFB_DRBG? If so, is this because OFB_DRBG wo...
If m: message, M: message space, k: key, K: keyspace, c: cipher, C: cipher space and $E_k$: encryption function, such that $E_k(m) = c,\ m,m^* \in M,\ k\in K,\ c\in C.$ My first question is, is the following equation correct for One Time Pad encryption? $$P[E_k(m) = c] = \frac{ \sum_{m_ i\in M} \sum_{k_ i\in K} ...
Let's say I have a plaintext, the corresponding ciphertext encrypted using AES-XTS, and the initialization vectors. Is there any way - not brute force, of course - to compute the key? Even if there's no known way, feel free to share articles on the subject
No OFB_DRBG isn't directly vulnerable to attacks. However from a theoretical standpoint there are two points speaking against it and in favor of CTR_DRBG. 1. Speed. CTR can be parallelized (can encrypt counters in parallel), OFB can't (encrypting state over and over again) 2. Cycling. It's likely that OFB will...