instruction
stringlengths
15
30k
How to generate the APA SBox?
In **NTRU** crypto system I have used these polynomials and parameters: $N = 17, p = 7, q = 64$ and $f$ as private key is: $$f = -1 + x + x^2 - x^4 + x^6 + x^9 - x^{10}$$ So the inverse of $f$ in ring $\mathbb{Z}[X]/(X^N-1)$ is: $$f_p = 3x^{16} + 3x^{15} + x^{14} + 6x^{13} + 5x^{12} + 6x^{11} + x^{10} + 2x^9 + 2x^8...
A website stores username and password in a session cookie. In the cookie the <br> password is "encrypted" or modified in some way. Given that the "encrypted" <br> version is always the same, I do not believe there is a time sensitive factor. <br> I could create multiple sets of this data, but it's time consuming...
Is the "compression function" in Merkle-Damgård just a collision-resistant, one-way hash function but one that operates only on fixed size inputs? If so, is MD just a way to extend it to work on arbitrary length strings?
OTP encryption is unbreakable as it seems. I have read some stuff (wiki, blogpost, etc.) but i would not find any information how they are used. If i wanted to create a messenger service, how would i distribute the keys? Both the sender and the receiver need this key before the message is send, right? And how do i m...
How are onetimepads distributed?
I understand why randomness has to be employed in encryption, because deterministic ciphers are not IND-CPA. I don't understand why using randomness in digital signature schemes like RSA-PSS provides any advantage over deterministic schemes like RSA-FDH. Isn't it still likely that RSA-FDH is EUF-CMA?
Why use randomness in digital signature algorithms?
I understand why randomness has to be employed in encryption, because deterministic ciphers are not IND-CPA. I don't understand why digital signature schemes that employ randomness, like RSA-PSS, are any better than purely deterministic schemes like RSA-FDH. Isn't it still likely that RSA-FDH is EUF-CMA?
I understand why randomness has to be employed in encryption, because deterministic ciphers are not IND-CPA. I don't understand why digital signature schemes that employ randomness, like RSA-PSS, are any better than purely deterministic schemes like RSA-FDH. Isn't it still likely that RSA-FDH is EUF-CMA? Acronyms: ...
‎ $$\ ‎‎please help me what is number of invertible matrix ‎m*m‎‎‎ on Group z_n ?‎‎‎$$\\‎ $$\ ‎‎we know this number on z_p\quad\ (‎$‎p is prime‎$‎) is\quad\ ‎(p^n-1)(p^n-p)\cdots(p^n-p^{n-1})}‎‎‎‎$‎$
what is number of invertible matrix m*m on z_n?
‎ > ‎‎please help me what is number of invertible matrix $\‎m*m$‎‎‎ on Group z_n ?‎‎‎\\‎ $\ ‎‎we know this number on $\z_p\quad\ (‎$‎p is prime‎$‎) is\quad\ ‎(p^n-1)(p^n-p)\cdots(p^n-p^{n-1})}‎‎‎‎$
‎ > ‎‎please help me what is number of invertible matrix $‎m*m$‎‎‎ on Group $\mathbb{z}_n$ ?‎‎‎, assuming we know‎ this number in $\mathbb{Z}_p \quad$ (‎p is prime‎‎) is \quad $‎(p^{n-1})(p^{n-p}) \cdots (p^n-p^{n-1})‎‎‎‎$
In Elliptic Curve Cryptography (ECC) assuming user A has a private public key pair of $S$, $P$ accordingly with generator point $G$ which as we know is: $$P=S*G$$ Assuming that user A wants to generate multiple key pairs deterministically to manage them easier and there is a user B who should be involved in the proces...
Consider the following scenario: The Information Security Department (ISD) of an organization issues each of the organization's employees, domestic and abroad, with an individual RSA key. To simplify the PKI maintenance for the organization, it was decided that a single modulus *n* will be generated by the ISD and e...
Consider the following scenario: The Information Security Department (ISD) of an organization issues each of the organization's employees, domestic and abroad, with an individual RSA key. To simplify the PKI maintenance for the organization, it was decided that a single modulus *n* will be generated by the ISD and e...
You just have to do some simple algebra. $$E^x \cdot F^y$$ $$M^{e_1^x} \cdot M^{e_2^y}$$ $$M^{xe_1} \cdot M^{ye_2}$$ $$M^{xe_1 + ye_2}$$ Well, what is $xe_1+ye_2$?
I understand why randomness has to be employed in encryption, because deterministic ciphers are not IND-CPA. I don't understand why digital signature schemes that employ randomness, like RSA-PSS, are any better than purely deterministic ones like RSA-FDH. Isn't it still likely that RSA-FDH is EUF-CMA? Acronyms: ...
I understand why randomness has to be employed in encryption, because deterministic ciphers are not IND-CPA. I don't understand why digital signature schemes that employ randomness, like RSA-PSS, are any better than purely deterministic ones like RSA-FDH. Isn't it still likely that RSA-FDH is EUF-CMA? Acronyms: ...
I understand why randomness has to be employed in encryption, because deterministic ciphers are not IND-CPA. I don't understand why digital signature schemes that employ randomness, like RSA-PSS, are any better than purely deterministic ones like RSA-FDH. Isn't it still likely that RSA-FDH is EUF-CMA? Acronyms: ...
You just have to do some simple algebra. $$E^x \cdot F^y$$ $$(M^{e_1})^x \cdot (M^{e_2})^y$$ $$M^{xe_1} \cdot M^{ye_2}$$ $$M^{xe_1 + ye_2}$$ Well, what is $xe_1+ye_2$?
I'm studying the Goldreich-Goldwasser-Micali construction from pseudo-random generators to pseudo-random functions. In this specific construction, assume $G:\{0,1\}^n\rightarrow \{0,1\}^{2n}$ is a PRG, mapping $x$ to $G(x)=(G_0(x),G_1(x))$. Then the PRF in this construction is given by $$F_k(x)=G_{x_n}\circ\cdots\circ...
Maybe this turns out to be a very naive question, but is better to ask once than to be in doubt forever. <b>Edit:</b> [Here is a detailed][roots] analysis of “roots”. The discrete logarithm problem as defined [here][wdlog]:<br> “any integer k that solves $b^k = \{g\mod{n}\}$ is termed a discrete logarithm” i.e....
It is not easy to understand why this becomes a hard problem. The discrete logarithm problem as defined [here][wdlog]:<br> “any integer k that solves $b^k = \{g\mod{n}\}$ is termed a discrete logarithm” i.e.:<br> Finding an integer $k$ for $b$ and $g$ known in $b^k=\{g\mod{n}\}$ I wonder. Is the reverse, that i...
It is not easy to understand why this becomes a hard problem. The discrete logarithm problem as defined [here][wdlog]:<br> “any integer k that solves $b^k = \{g\mod{n}\}$ is termed a discrete logarithm” i.e.:<br> Finding an integer $k$ for $b$ and $g$ known in $b^k=\{g\mod{n}\}$ I wonder. Is the reverse, that i...
In [How to Construct Multicast Cryptosystems Provably Secure Against Adaptive Chosen Ciphertext Attack](https://www.cs.berkeley.edu/~jfc/papers/06/CT-RSA06.pdf), the paper states under preliminaries: > We consider the scenario where a single party, called the center, > sends messages, over insecure channels, to a g...
In [How to Construct Multicast Cryptosystems Provably Secure Against Adaptive Chosen Ciphertext Attack](https://www.cs.berkeley.edu/~jfc/papers/06/CT-RSA06.pdf), the paper states under preliminaries: > We consider the scenario where a single party, called the center, > sends messages, over insecure channels, to a g...
‎ > ‎‎please help me what is number of invertible matrix $‎m*m$‎‎‎ on Group $\mathbb{z}_n$ ?‎‎‎, assuming we know‎ this number in $\mathbb{Z}_p \quad$ (‎p is prime‎‎) is $‎(p^{n}-1)(p^{n}-p) \cdots (p^n-p^{n-1})‎‎‎‎$
what is number of invertible matrix m*m on$ z_n$?
As we know that in stream cipher algorithm plain text and generated key are Xored byte by byte. As generated key is depends on how many plain text is there and on that basis key will generate and plain text is encrypted. So my doubt is I am using latest stream cipher algorithm that is Rabbit and encrypting plain text u...
We know that in stream cipher algorithms plain text and generated key are Xored byte by byte. Generated key depends on how much plain text there is and on that basis key will generate and plain text is encrypted. So my doubt is I am using the latest stream cipher algorithm that is Rabbit and encrypting plain text using...
What is the largest integer that can be factored by modern algorithm like **Msieve** and **GGNFS** in a time less than **5** hours? An integer like $$6764305444023748746863375505235232356330698800019155741251564477831918942242883171154012150590008894127708940364431129$$ can factorize in less than 5 hours?
What is the largest integer that can be factored by modern algorithm like **Msieve** and **GGNFS** in a time less than **5** hours with normal computers? An integer like $$6764305444023748746863375505235232356330698800019155741251564477831918942242883171154012150590008894127708940364431129$$ can factorize in les...
>Which one these alternatives using authentication and encryption will solve this multiple-user database problem ? I'm trying to understand the field of cryptography, so I've started reading a textbook on the subject. An exercise at the end of a chapter of authenticity asks the following: I've a strong feeling...
Which one these alternatives using authentication and encryption will solve this multiple-user database problem?
Let me try to elaborate on their proof. Suppose you had a hash function $H$ that was second-preimage resistant but *not* first-preimage resistant. By showing that this leads to a contradiction, we will be showing that with second-preimage resistance, you must have first-preimage resistance. Namely, we will show that th...
It seems that you do want to be given the answer and not just hints, so I will do that. But I'll go step by step so that you can stop reading if you want to finish by yourself. It seems to me that both solutions satisfy the first requirement consisting in *authenticity*. Breaking this property would consist in chang...
What is the largest integer that can be factored by modern algorithm like **Msieve** and **GGNFS** in a time less than **5** hours with normal computers? For example, can an integer like <code>6764305444023748746863375505235232356330698800019155741251564477831918942242883171154012150590008894127708940364431129</co...
In World War II, this practice of generating "random" code books by hand is known to have been used by the Special Operations Executive, or SOE: > Various techniques have been used to do the random generation. Marks > describes how SOE agents’ silken keys were manufactured in Oxford by > little old ladies shufflin...
I know the topic of human brains generating random numbers has been discussed here and in Cognitive Sciences before, but I am interested in a particular part of it: In an introductory book to cryptography I read recently ("Cuando la criptografia falla", by Arturo Quirantes), it is mentioned that in some historical o...
Has human-generated entropy ever been a real problem?
I'm taking a hardware cryptography class and working on a problem that focuses on Montgomery Reduction. So by definition: Computing a x b (mod N) Pick R, s.t. R > N, gcd (R,N) = 1 Compute N^-1 (mod R) a’ = a * R (mod N), b’ = b * R (mod N) c’ = (a’ * b’) * R^-1 (mod N) c = c’* R^-1 (mod N) Clai...
I've got a question concerning fields used in RSA: Let's use the following symbols for my example: {p,q} = primes {e,n} = public key {d,n] = private key I learnt that an inverse element exists if a is coprime to m. Applied to RSA I would have guessed that e needs to be coprime to n in order to find it's inv...
Problem: I have a small sized domain, say s-bit. It's clear that the probability for an adversary to guess an element is $ \frac{1}{2^s}$. I need to make the probability negligible. However, I need to use a public encoding (or mapping) techniques, so anybody can map its elements from an small sized domain to a big one....
Problem: I have a small sized domain, say s-bit. It's clear that the probability for an adversary to guess an element is $ \frac{1}{2^s}$. I need to make the probability negligible. However, I need to use a public encoding (or mapping) techniques, so anybody can map its elements from an small sized domain to a big one....
> Can you help me understand what a cryptographic “salt” is? In the context of password creation, a "salt" is data (random or otherwise) added to a hash function in order to make the hashed output of a password harder to crack. > When might I need to use it? Always. > Why should or should I not use it? Y...
asymmetric cryptography is well known. You generate private key. Using private key you generate public key. Then you can sign a message with private key and check signature using public key. I need more sophisticated asymmetric cipher. You generate private key. Using private key you generate some public keys. ...
Asymmetric cryptography is well known. You generate a private key. Using the private key you generate a public key. Then you can sign a message with the private key and check signatures using the public key. I need a more sophisticated asymmetric cipher. You generate a private key. Using this private key you ge...
1. Given: $m = \{0,1\}^{n}$; a plaintext message of length $n$ encoded in binary $k = randomshuffle([0, 1, ..., 2n-1])$; A secret key consisting out of unique numbers between 0 and $2n-1$ in a true random order. The key is only used once and preshared between sender and receiver. 2. We create $t = m||NOT(m)$...
Is this transposition cipher information-theoretically secure for 1 message?
Asymmetric cryptography is well known. You generate a private key. Using the private key you generate a public key. Then you can sign a message with the private key and check signatures using the public key. I have different process which is as follows On the one side are a lot of people that create messages...
Say I roll a six sided die 200 times (6^200 = ~2^517) and string all the results together into a long string of numbers and hash then result with SHA-512. Can I use that result for cryptographic purposes such as keys? Can I then use the hash of that result to generate more keys?
Can a cryptographic hash be used as a cryptographic RNG?
I am reading the Pinocchio paper (verifiable computation): http://research.microsoft.com/pubs/180286/pinocchio.pdf The paper is rather hard for me. For the Figure 2, I guess $v_1(x)$ should be $(r_6-r_5)^{-1}*(x-r_5)$, and the rest can be found similarly. Is this right? If yes, then how do we determine $r_5$ and $r...
The hashing scheme SHA-256 (for instance) is based on Merkle-Damgard construction with the underlying compression function based on the block cipher SHACAL-2 configured in Davies Meyer mode. SHACAL-2 has 80 rounds, per 512 bit block of data (which is inserted in the key input of the block cipher). As an alternative, on...
**Using AES as a Davies Meyer compression function is a bad idea:** 1. It has a block size of 128 bits, which limits its collision resistance to 64 bits, which is rather weak. This limitation could be overcome by using Rijndael with a 256 bit block size, but then you'd need to use a higher number of rounds. ...
**Using AES as a Davies Meyer compression function is a bad idea:** 1. It has a block size of 128 bits, which limits its collision resistance to 64 bits, which is rather weak. This limitation could be overcome by using Rijndael with a 256 bit block size, but then you'd need to use a higher number of rounds. ...
The idea is to share *n* images among *n* persons so that all images can be reconstructed by someone in possession of all shares. However, there must not be any data overhead (which means the shares sent to the persons must not be bigger in size than the original images. In other terms: No data overhead). The i...
The idea is to share *n* images among *n* persons so that all images can be reconstructed by someone in possession of all shares. However, there must not be any data overhead (which means the shares sent to the persons must not be bigger in size than the original images. In other terms: No data overhead). The i...
1. what does ROTL stand for? I know it does left shifting but what about the acronym? 2. When we do a left shift, do we take the leftmost bit and add it at the end, by making the second bit the first, and the third the second... and the first the last ? OR, we remove the first bit, and add a 0 at the end? left shif...
How does ROTL work?
Is [Lamport's One Time Signature][1] used as a primitive to construct any other cryptographic protocols? [1]: https://wiki.cc.gatech.edu/theory/images/6/6d/Lec13.pdf
**Using AES as a Davies Meyer compression function is a bad idea:** 1. It has a block size of 128 bits, which limits its collision resistance to 64 bits, which is rather weak. This limitation could be overcome by using Rijndael with a 256 bit block size, but then you'd need to use a higher number of rounds. ...
If you took a hashing algorithm for example MD5 and passed the output hash back into the algorithm an infinite number of times would you end up with one unique hash? My idea is that the maximum number of hashes initially is $2^{128}$ however if you feed the hash back into the algorithm there would be collisions so t...
If you hashed a hash an infinite number of times would you end up with a unique hash?
## A Flaw If you try working through your example concretely then you should see at least one issue with decoding. Consider values mod $8$: $ A = { 3 } \\ B = {7} \\ secret = {5 } $ Using your equations we have: $ Q = 3 + 7 + 5 = 7 \\ U = 3 - 7 + 5 = 1 $ And for decoding: $ B = (U - Q) / 2...
If I were to have a 4096-bit file of random data (/dev/random) used as a keyfile for LUKS, would there be any benefit to having a key iteration count higher than 1? My reasoning is that the attacker could choose to guess the contents of the 4096-bit file (very very hard), the 256-bit master key (still hard, but easi...
If I were to have a 4096-bit file of random data (/dev/random) used as a keyfile for LUKS, would there be any benefit to having a key iteration count higher than 1? My reasoning is that the attacker could choose to guess the contents of the 4096-bit file (very very hard), the 256-bit master key (still hard, but easi...
If you took a hashing algorithm for example MD5 and repeatedly passed the output hash back into the algorithm an arbitrarily large number of times would you eventually end up with one unique hash? My idea is that the maximum number of hashes initially is $2^{128}$ however if you feed the hash back into the algorithm...
So I am using cryptopp to encrypt a file in a project and I am using AES-GCM. I have a 256bit key and a 128bit ivec and a 128bit tag that I use to encrypt files. However, I want to know where the authentication tag is stored? I notice if I specify a tag size of 0 then the encrypted file size is the same number of b...
Where is the authentication tag stored in file encrypted using AES-GCM?
secp256k1 (the signature scheme used by Bitcoin) has the interesting property that you can add two public keys to get a combined key that requires both private keys to produce signatures for. Is there another, more widely used public key cryptography scheme with the same property?
If a system hashes passwords with a 256-bit long hash, are passwords (which are not necessarily alphanumeric, can be any value per byte (0-255)) longer than 32 bytes useless under the context in which an attacker with a VERY fast machine brute forces passwords?
Password length versus hash length?
The idea is to share *n* images among *n* persons so that all images can be reconstructed by someone in possession of all shares. However, there must not be any data overhead (which means the shares sent to the persons must not be bigger in size than the original images. In other terms: No data overhead). The i...
A 2DES like cipher $c=E^{(2)}_{K_2}(E^{(1)}_{K_1}(p))$ where both halves have an $n$ bit key is vulnerable to a meet-in-the-middle attack. Meet-in-the-middle using a big table ----- Create a table containing $E^{(1)}_{K_1}(p)$ for all possible $K_1$ and computing $D^{(2)}_{K_2}(c)$ for all values of $K_2$, looki...
Can cycle findinding techniques reduce the memory usage of the MitM attack against 2DES and 3DES?
Would it be secure if we reveal the mapping between two permuted vectors to an adversary?
According to [Paillier cryptosystem][1] the product of two ciphertexts will decrypt to the sum of their corresponding plaintexts. I have two separate integer sequences X and Y that have same number of values. I want to calculate the 1-1 combination that minimizes the sum (e.g, `x1+y1 IF and ONLY IF x1+y1 <= x2+y2 AN...
Can cycle finding techniques reduce the memory usage of the MitM attack against 2DES and 3DES?
CBC MAC that is using AES as the underlying block cipher, has tag space of 2^128. If we add a random single block, concatenating it with the tag, and encrypt it again in AES CBC mode, with additional key, we get a 256 bit tag of 256 bits space: TAG = CBC_MAC(K2,CBC_MAC(K1,M)||r) || r (where r is 128 bit random n...
Does SRP reduce to DH key exchange when shared password is not secret?
I was reading the paper [Breaking the Rabin-Williams digital signature system implementation in the Crypto++ library](https://eprint.iacr.org/2015/368.pdf). The library uses blinding, but it was not enough to stop key recovery. But my question is about the *Integer r* used for blinding. Crypto++ uses a random integ...
Rabin-Williams, blinding and size of Integer r?
Blinding is usually applied on the whole modulus, and I see no incentive to do otherwise; random is cheap. --- In RSA, blinding is not always applied as described in the question and article, for efficiency reasons: the technique used requires computing $r^d\bmod N$, which is just as costly as the $m^d\bmod N$ oper...
Blinding is usually applied on the whole modulus, and I see no incentive to do otherwise; random is cheap. --- In RSA, blinding is not always applied as described in the question and article, for efficiency reasons: the technique described requires computing $r^d\bmod N$, which is just as costly as the $m^d\bmod N$...
I'm interested in using a modified form of SRP as a peer-to-peer authentication method. Since neither side is acting as a host, one of the primary design goals for SRP (that the client doesn't need to know anything but an identity and password, so no key management is required) isn't really necessary. There's a var...
Is this variant of SRP useful?
I'm interested in using a modified form of SRP as a peer-to-peer authentication method. Since neither side is acting as a host, one of the primary design goals for SRP (that the client doesn't need to know anything but an identity and password, so no key management is required) isn't really necessary. There's a var...
Blinding is usually applied on the whole modulus, and I see no incentive to do otherwise; random is cheap. --- In RSA, blinding is not always applied as described in the question and article, for efficiency reasons: the technique described requires computing $r^d\bmod N$, which is just as costly as the $m^d\bmod N$...
Blinding is usually applied on the whole modulus, and I see no incentive to do otherwise; random is cheap. --- In RSA, blinding is not always applied as described in the question and article, for efficiency reasons: the technique described requires computing $r^d\bmod N$, which is just as costly as the $m^d\bmod N$...
I'm interested in using a modified form of SRP as a peer-to-peer authentication method. Since neither side is acting as a host, one of the primary design goals for SRP (that the client doesn't need to know anything but an identity and password, so no key management is required) isn't really necessary. There's a var...
I'm interested in using a modified form of SRP as a peer-to-peer authentication method. Since neither side is acting as a host, one of the primary design goals for SRP (that the client doesn't need to know anything but an identity and password, so no key management is required) isn't really necessary. There's a var...
I'm interested in using a modified form of SRP as a peer-to-peer authentication method. Since neither side is acting as a host, one of the primary design goals for SRP (that the client doesn't need to know anything but an identity and password, so no key management is required) isn't really necessary. There's a var...
Is it possible to recompute the Salsa20 or ChaCha20 key in a realistic time if the keystream and the nonce are given to an attacker? Or is the keystream generation one-way, like a cryptographic has function?
Is the Salsa20/ChaCha20 keystream generation one-way?
Blinding is usually applied on the whole modulus, and I see no incentive to do otherwise; random is cheap. --- In RSA, blinding is not always applied as described in the question and article, for efficiency and security reasons: the technique described requires computing $r^d\bmod N$, which is just as costly as the...
The classic DES uses 8 different fixed S boxes. If computer memory was not an issue, would say 800 different S boxes be more secure? I'm thinking of a SP-network that would only run on a server like computer, and not have to be ported to smaller things like smart cards. Is more better? Might it mean fewer round...
Are more S boxes more secure in a SP-Network?