instruction
stringlengths
15
30k
why don't you just use RSA, it's the common solution for that problem. a sends a message to b, signs it with SK(a) and encrypts it with PK(b). Read more here: http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange#Public_Key The main problem i see (even when using RSA) is, how to verify that the published ...
I was wondering whether it is safe to use the same DH or ECDH key pair in more than one key agreement, particularly if these public keys are in a public registry. These public keys could be used by your counterparts (who also have their public keys in the same registry) to agree on a secret used to send you a message, ...
Reading through the DES Specification it says that the keys are permuted with `PC-1` initially and then shifted left both $C$ and $D$. However, before it gets permuted again through `PC-2` it does not mention how $C$ and $D$ are put together before going through `PC-2`. Is it assumed that $C$ is the lower half of t...
I'm working on a Java authentication subsystem that specs the storage of passwords in the DB as `PBKDF2-generated` hashes, and I'm now trying to decide whether I should use `SHA1` or `SHA512` as PFR. I'm under the impression that the consensus is that `SHA1` has some theoretical weaknesses, and that `SHA512` should be ...
I'm using Blowfish in a toy Diffie-Hellman communications scheme. Random session keys are generated for each connection. In this case I can simply feed a null array to the IV right? The same plaintext would never be encrypted with the same keystream.
I have installed a python implementation of scrypt and noticed it has several functions, both an encrypt and hash function. Yet Wikipedia lists it as being used for PBKDF instead of PBKDF2. Is scrypt a hashing function for PBKDF2 or is it on its own an alternative?
Is scrypt a hashing function, encryption, or PBKDF?
The 64 bit machine's biggest number can be 2^63 (9,223,372,036,854,775,807). So what kind of a monstrous machine can generate 100-400 digits prime number? I probably don't understand something, so that's why I am asking.
What kind of machine can generate 100-400 digits prime number? RSA
<p>So, having read a variety of documentations on AES encryption, I came to the unknowledgeable conclusion that the key schedule applied to the array of chunks, and not just the 14 cycles on a single chunk. Thus I concluded that AES was not a linear hash, such that ciphering sequential equivalent chunks would produce a...
Is AES a linear hash?
I have come up with an encryption algorithm and I am looking for a place to possibly publish it. Any ideas?
Where could I submit my algorithm?
First, and I know this isn't exactly the answer you're seeking, but I'd mull over it for a while. Hopefully you have read Schneier's [Memo to the Amateur Cipher Designer](https://www.schneier.com/crypto-gram-9810.html#cipherdesign); it speaks the truth. In short, before you try to go the route of publishing your alg...
Given you a protocol, if we can reduce breaking the protocol to a hard problem, such DLP or CDH, then we can say that this protocol is secure. theoretically speaking, reduction is a good method to prove the security of a protocol.As to the key-exchange protocol, reduction method use the adversary as a subroutine, ...
where the meaning of reduction to a hard problem lies?
Given you a protocol, if we can reduce breaking the protocol to a hard problem, such as DLP or CDH, then we can say that this protocol is secure. Theoretically speaking, reduction is a good method to prove the security of a protocol. As to key-exchange protocols, if the reduction method uses the adversary as a subr...
Where does the meaning of reduction to a hard problem lie?
I recently began using PGP desktop and found several options for my encryption capabilities. Which of these (Aes, Cast, Triple Des, TwoFish, IDEA) is the most recent, firstly, secondly may the N S A not have the keys to decrypt? Are there any encryption protocols not listed that are perhaps safer to use? After rea...
> 1 - How feasible is it that the chip's manufacturer can predict the output of this PRNG when it passed tests from the people applying the use of this RdRand instruction in kernels? As nightcracker correctly stated, any strong cryptographic PRNG will produce a stream of numbers that pass statistical tests. Howev...
I have a lot of objects, all of which need a particular number tagged on them so i can quickly tell the customer accordingly. But the problem is that the customer should not know what these numbers say (I write how much i buy the object for). Is there any way i can encode them so that i can quickly decode and understan...
Encoding numbers that can be decoded mentally?
I have to implement 256*256 bit Montgomery multiplier for pairing computation. The straight forward approach is to use bit serial version, but i would like to utilize the in-build 64*64 bits multiplier soft cores on modern FPGA devices, therefore needs to implement block wise implementation (64 bits each). Two choices ...
The algorithm describing the simulation can indeed be "implemented" - thats essentially the proof strategy which the simulator follows. However, the algorithm implementing the adversary (whom the simulator communicates with) is another story. Since you want the reduction to hold (typically) for any PPT adversary, y...
The algorithm describing the simulation can indeed be "implemented" - thats essentially the proof strategy which the simulator follows. However, the algorithm implementing the adversary (whom the simulator communicates with) is another story. Since you want the reduction to hold (typically) for any PPT adversary, y...
I recently began using PGP desktop and found several options for my encryption capabilities. Which of these (AES, Cast, Triple DES, TwoFish, IDEA) is the most recent, firstly, secondly may the NSA not have the keys to decrypt? Are there any encryption protocols not listed that are perhaps safer to use? After readin...
I was wondering if I have the key and the encrypted Hill Cipher message(s). I can definitely figure out the charset involved. But the order is missing. Assuming that I use 37 modulo or higher. How would I go about cracking it?
I have a lot of objects, all of which need a particular number tagged on them so I can quickly tell the customer accordingly. But the problem is that the customer should not know what these numbers say (I write how much I buy the object for). Is there any way I can encode them so that i can quickly decode and unders...
I have to implement a 256*256 bit Montgomery multiplier for pairing computations. The straightforward approach is to use a bit-serial version, but I would like to utilize the built-in 64*64 bits multipliers on soft cores of modern FPGA devices, therefore I need a blockwise implementation (64 bits each). Two choices for...
According to this paper by Mihir Bellare and Adriana Palacio <a href="http://www.iacr.org/archive/crypto2002/24420162/24420162.pdf">link</a>, Schnorr identification scheme is secure under an active adversary who changes messages. I have been told that Schnorr is actually not secure against such an adversary but I am no...
According to [this paper](http://www.iacr.org/archive/crypto2002/24420162/24420162.pdf) by Mihir Bellare and Adriana Palacio, Schnorr identification scheme is secure under an active adversary who changes messages. I have been told that Schnorr is actually not secure against such an adversary but I am not able to find a...
Shamir's secret sharing allows a secret to be split into multiple shares so that it can be reconstructed later . Now is there a way to do the reverse ? Can we combine few secrets first and later split them into their original forms ? Or what is this called in literature ? Of course simplest i could think of is c...
Is there way to combine secrets first and later split them?
NSA's own nuclear, military, navy, airforce and classified government networks are probably some of the most secure systems on the planet. They need to be extremely strong to protect the armed forces, government and populace. However the same cannot be said for their publicly recommended encryption systems because rece...
NSA's own nuclear, military, navy, airforce and classified government networks are probably some of the most secure systems on the planet. They need to be extremely strong to protect the armed forces, government and populace. However the same cannot be said for their publicly recommended encryption systems because rece...
Shamir's secret sharing allows a secret to be split into multiple shares so that it can be reconstructed later . Now is there a way to do the reverse ? Can we combine few secrets first and later split them into their original forms ? Or what is this called in literature ? More clearly, Given two strings i want t...
I would like to insert a key deriving function into EAX mode, in order to hamper brute-force attacks for a key-size restricted cipher (56 bits). The modification inserts an identical multi-block message *S* behind the corresponing tweaks: Original: OMAC(*T* || ...) where *T* is a 128-bit integer of 0, 1, 2 Modifi...
I would like to insert a key deriving function into EAX mode, in order to hamper brute-force attacks for a key-size restricted cipher (56 bits). The modification inserts an identical multi-block pattern *S* behind the corresponing tweaks: Original: OMAC(*T* || ...) where 128-bit tweak *T* is either 0, 1, 2 Modifi...
I would like to insert a key deriving function into EAX mode, in order to hamper brute-force attacks for a key-size restricted cipher (56 bits). The modification inserts an identical multi-block pattern $S$ behind the corresponing tweaks: Original: $OMAC(T||...)$ where 128-bit tweak $T$ is either `0`, `1`, `2`. M...
Is this EAX extension weakening the (provable) security of EAX?
Despite the fact primality test is a mathematical issue, it plays a part on the security of many cryptosystems such as RSA. I was trying to understand how it works until I came to the following congruency 〖(X+a)〗^p≡X^p+a (mod X^r-1,p) The above reduces evaluating the initial congruency 〖(X+a)〗^p≡X^p+a (mod p) ...
Despite the fact primality test is a mathematical issue, it plays a part on the security of many cryptosystems such as RSA. I was trying to understand how it works until I came to the following congruency: 〖(X+a)〗^p≡X^p+a (mod X^r-1,p) The above reduces evaluating the initial congruency `〖(X+a)〗^p≡X^p+a (mod...
How can I evaluate the congruency of an AKS primality test?
I have the following A Encrypted file and the same file in its original(not encrypted) form Now will it be possible to find the encryption/decryption key by comparing the the above two files are there any known programs that can help me. any help will be highly appreciated edit: I have uploaded the two fil...
*I have not examined the zip file. I will leave that for you as exercise.* But I'll try to give quick advice how to proceed with finding key, in typical cases. The first things would be to find out what cryptographic algorithm has been used to encrypt the file. Maybe the name of algorithm is mentioned (file metadat...
I cannot seem to understand the role or goal of Quantum Fourier Transformation of Shor's integer factorization algorithm? Is it used to collapse all quantum states into one in which it has a factor of a given input n?
(That Tor mailing list link appears to be broken at the moment) Your question is at least partially answered in [FIPS 186-3](http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf) itself… **Appendix A** describes how to start with a seed and use an iterative process involving SHA-1 until a valid ellipti...
I have a simple question about the use of random variables for encryption schemes, to make sure my intuition is correct. We say $P(K = k)$ to represent the probability that a particular key $k$ is chosen by the probabilistic algorithm Gen. Formally, $K$ is a random variable that denotes the value of the key. So ...
I'm trying to generate a signature for DSA with the following parameters: *p*=23 , *q*=11 , *g*=3, *H*(*m*)=8 for the life of me, I cannot choose a random *k* (0 > *k* > *q*) that will give me *r* , *s* that 'add up' when calculating *w*, *u1*, *u2*, and verifying. I don't know if I'm just doing my maths wron...
![Diagram of IDEA round function][1] [1]: https://i.stack.imgur.com/MLF1y.png As we can see in the picture we have a multiplication in this algorithm, we know that two 16 bit inputs should have a 32 bit output, but here we just use 16 bits of the 32 bit output. For decryption we can reverse the algorithm fr...
How is multiplication inverted in IDEA's decryption round?
I'm using eCryptfs on several directories on my dedicated Debian server. I mount them manually via 'mount -t ecryptfs [dir] [mountpoint]'. But after some weeks being mounted it's not easy to remember the exact passwords for each directory. I want to make sure that I got the right passwords before unmounting them or...
Consider an outsourced database to an untrusted cloud (think CryptDb), the question is how to compute a function f(.) on the data. I think I understand how (fully or partially) homomorphic encryption works in this situation: a. encrypt the input b. outsource both the ciphertexts and the (public) function c. the...
Consider an outsourced database to an untrusted cloud (think CryptDb), the question is how to compute a function f(.) on the data. I think I understand how (fully or partially) homomorphic encryption works in this situation: 1. encrypt the input 2. outsource both the ciphertexts and the (public) function ...
I'm trying to generate a signature for DSA with the following parameters: *p*=23 , *q*=11 , *g*=3, *H*(*m*)=8 for the life of me, I cannot choose a random *k* (0 > *k* > *q*) that will give me *r* , *s* that 'add up' when calculating *w*, *u1*, *u2*, and verifying. I don't know if I'm just doing my maths wron...
If an RSA encryption uses a modulus $n$ of 15000 bits and: $e$ = 3 or $e$ = $2^1$$^6$ + 1 How many squarings and multiplications will we need for encryption? And what about for decryption? Could you please explain the concept of square and multiply as well. I'm thinking the number of squarings is going t...
If an RSA encryption uses a modulus $n$ of 15000 bits and: $e = 3$ or $e = 2^{16} + 1$ How many squarings and multiplications will we need for encryption? And what about for decryption? Could you please explain the concept of square and multiply as well. I'm thinking the number of squarings is going to b...
I´m trying to follow one of very detailed RSA Proofs given by di-mgt: http://www.di-mgt.com.au/rsa_theory.pdf but unfortunately I stuck at the beginning of solution (ch.3). I don´t know where is the second part of (8) coming from: RsaPrivate(RsaPublic(m)) = <b>(m<sup>e</sup> mod n)<sup>d</sup> mod n = m<sup...
I'm trying to generate a signature for DSA with the following parameters: $p = 23$ , $q = 11$ , $g = 3$ , $H(m) = 8$ , $x = 5$ for the life of me, I cannot choose a random $k$ ($0 > k > q$) that will give me $r$ , $s$ that 'add up' when calculating $w$, $u1$, $u2$, and verifying. I don't know if I'm just doin...
If we encrypt a message twice with symmetric key $k_1$ first and then $k_2$ like $E_{k2}\{E_{k1}\{m\}\}$ , ideally we should decrypt with $k_2$ first and then $k_1$ but is it possible to decrypt with $k_1$ and then with $k_2$ ? Using any of the AES Modes preferably ?
Can we decrypt in this order when the message is encrypted twice?
What you are asking appears to be 'is AES commutative'? The short answer to which is no. Long answer coming in a moment Suppose we have that our ciphertext: $$c = E_{k_2} ( E_{k_1} ( m ) )$$ Then as you noted $$D_{k_1}(D_{k_2}(c))= D_{k_1}(D_{k_2}(E_{k_2} ( E_{k_1} ( m ) ))) = m$$ However,
What you are asking appears to be 'is AES commutative'? The short answer to which is no: encrypting with AES with key 1 then key 2 will not (generally) give the same output as encrypting with key 2 then key 1, which is what would be required for naive implementation. However, there are modes in which AES can be use...
After reading the comments on your original post, I thought I'd give you an example for exponentiating by e. Take for example the case $e=2^{16}+1$. Then, to calculate $x^e$ we use $16$ squaring operations and one multiply. This is because $$x^{2^{16}+1}=x \cdot x^{2^{16}} =x\cdot x^{\underbrace{2\cdot 2 \cdots 2...
After reading the comments on your original post, I thought I'd give you an example for exponentiating by e. Take for example the case $e=2^{16}+1$. Then, to calculate $x^e$ we use $16$ squaring operations and one multiply. This is because $$x^{2^{16}+1}=x \cdot x^{2^{16}} =x\cdot x^{\underbrace{2\cdot 2 \cdots 2...
After reading the comments on your original post, I thought I'd give you an example for exponentiating by e. Take for example the case $e=2^{16}+1$. Then, to calculate $x^e$ we use $16$ squaring operations and one multiply. This is because $$x^{2^{16}+1}=x \cdot x^{2^{16}} =x\cdot x^{\underbrace{2\cdot 2 \cdots 2...
What you are asking appears to be 'is AES commutative'? The short answer to which is no: encrypting with AES with key 1 then key 2 will not (generally) give the same output as encrypting with key 2 then key 1, which is what would be required for naive implementation. However, there are modes in which AES can be use...
Consider an outsourced database to an untrusted cloud (think CryptDb), the question is how to compute a function $f(.)$ on the data. I think I understand how (fully or partially) homomorphic encryption works in this situation: 1. Encrypt the input. 2. Outsource both the ciphertexts and the (public) functi...
What is known about the security of [identity-based encryption](http://en.wikipedia.org/wiki/Identity-based_encryption) schemes against attacks that involve seeing multiple ciphertexts and then receiving the private keys corresponding to _some_ of those ciphertexts? For example, is it known that feasible adversaries...
I'm using *"eCryptfs"* on several directories on my dedicated Debian server. I mount them manually via mount -t ecryptfs [dir] [mountpoint] But after some weeks being mounted it's not easy to remember the exact passwords for each directory. I want to make sure that I got the right passwords before unmounting...
I am implementing AES 256-bit Algorithm from the Theory given in the book, `Cryptography and Network Security by Behrouz A. Forouzan` The Algorithm defined in the Book for `Key Expansion` for `AddRoundKey`, is as follows, From the given 32-Bytes Cipher Key, I am supposed to generate `4 * (Nr + 1)` words. `Nr` ...
I am implementing AES 256-bit Algorithm from the Theory given in the book, `Cryptography and Network Security by Behrouz A. Forouzan` The Algorithm defined in the Book for `Key Expansion` for `AddRoundKey`, is as follows, From the given 32-Bytes Cipher Key, I am supposed to generate `4 * (Nr + 1)` words. `Nr` ...
I am implementing AES 256-bit Algorithm from the Theory given in the book, "Cryptography and Network Security" by Behrouz A. Forouzan. The Algorithm described in the Book in relation to `Key Expansion`, defines `AddRoundKey` like this: From the given 32-Bytes Cipher Key, I am supposed to generate `4 * (Nr + 1)` ...
Two different approaches for Key Expansion using the AES-256 algorithm?
I´m trying to follow one of the very detailed RSA Proofs given by di-mgt: "[RSA theory](http://www.di-mgt.com.au/rsa_theory.pdf)", but unfortunately I stuck at the beginning of solution (chapter 3). I don´t understand where the second part of (8) is coming from: $RsaPrivate(RsaPublic(m))\ =\ (m^e\ mod\ n)^d\ mod...
If an RSA encryption uses a modulus $n$ of 15000 bits and $e = 3$ or $e = 2^{16} + 1$, how many squarings and multiplications will we need for encryption, and for decryption? Could you please explain the concept of square and multiply as well? I'm thinking the number of squarings is going to be equal to the number o...
After reading the comments on your original post, I thought I'd give you an example for exponentiating by $e$. Take for example the case $e=2^{16}+1$. Then, to calculate $x^e$ we use $16$ squaring operations and one multiply. This is because $$x^{2^{16}+1}=x \cdot x^{2^{16}} = x\cdot x^{\underbrace{2\cdot 2 \cdots 2}...
I´m trying to follow one of the very detailed RSA Proofs given by di-mgt: "[RSA theory](http://www.di-mgt.com.au/rsa_theory.pdf)", but unfortunately I stuck at the beginning of solution (chapter 3). I don´t understand where the second part of (8) is coming from: $RsaPrivate(RsaPublic(m))\ =\ (m^e\ mod\ n)^d\ mod...
What you are asking appears to be 'is AES commutative'? The short answer to which is no: encrypting with AES with key 1 then key 2 will not (generally) give the same output as encrypting with key 2 then key 1, which is what would be required for naive implementation. However, there are modes in which AES can be use...
This is a multi-layer problem, and I want to take you through the whole thing rather than just asking about IVs. Bear with me. Also, all code below is in Common Lisp because that's what I'm using, but if there are any complaints, I'll edit to put up pseudocode. I'm trying to put together a procedure which will prod...
This is a multi-layer problem, and I want to take you through the whole thing rather than just asking about IVs. Bear with me. Also, all code below is in Common Lisp because that's what I'm using, but if there are any complaints, I'll edit to put up pseudocode. I'm trying to put together a procedure which will prod...
This "dense key space means that there are more combinations of the keys in that particular space and sparse the opposite" is pretty much it. Depending on cryptographic algorithm, key space can be less or more sparse. This depends on what primitives and possibly, what hard problems the security of the algorithm is b...
This is a multi-layer problem, and I want to take you through the whole thing rather than just asking about IVs. Bear with me. Also, all code below is in Common Lisp because that's what I'm using, but if there are any complaints, I'll edit to put up pseudocode. I'm trying to put together a procedure which will prod...
I'm trying to calculate [rcon table][1] values manually. I know how to calculate each value with the equation, rcon(i) = x^(i-1) mod x^8 + x^4 + x^3 + x^1 + 1 for example, recon(10) = x^(10-1) mod x^8 + x^4 + x^3 + x^1 + 1 x^(9) mod (x^8 + x^4 + x^3 + x^1 + 1) => x^5 + x^4 + x^2 + x => 0...
This is a multi-layer problem, and I want to take you through the whole thing rather than just asking about IVs. Bear with me. Also, all code below is in Common Lisp because that's what I'm using, but if there are any complaints, I'll edit to put up pseudocode. I'm trying to put together a procedure which will prod...
I am implementing AES 256-bit Algorithm from the Theory given in the book, "Cryptography and Network Security" by Behrouz A. Forouzan. The Algorithm described in the Book in relation to `Key Expansion`, defines `AddRoundKey` like this: From the given 32-Bytes Cipher Key, I am supposed to generate `4 * (Nr + 1)` ...
I am implementing AES 256-bit Algorithm from the Theory given in the book, "Cryptography and Network Security" by Behrouz A. Forouzan. The Algorithm described in the Book in relation to `Key Expansion`, defines `AddRoundKey` like this: From the given 32-byte cipher key, I am supposed to generate `4 * (Nr + 1)` w...
When doing cryptanalysis on RSA or something number theory based, there are various attacks that all seem to involve number theory ([Wikipedia: RSA_(algorithm) ~ Attacks_against_plain_RSA](http://en.wikipedia.org/wiki/RSA_%28algorithm%29#Attacks_against_plain_RSA)). Similarly, attacks on ECC seem to involve something...
Cryptanalysis not based on method used to encrypt?
I'm trying to calculate Rijndael key schedule "Rcon" values manually. I know how to calculate each value with the equation `rcon(i) = x^(i-1) mod x^8 + x^4 + x^3 + x^1 + 1`, for example: recon(10) = x^(10-1) mod x^8 + x^4 + x^3 + x^1 + 1 x^(9) mod (x^8 + x^4 + x^3 + x^1 + 1) => x^5 + x^4 + x^2 + x ...
Since it gives negative power, how is rcon(0) calculated in AES?
On page 11, definition 2 of "[Simultaneous Hardcore Bits and Cryptography Against Memory Attacks][1]", the paper outlines the following steps 1. (PK,SK) public key and secret key are generated by defender using Gen($1^n$). 2. Adversary $A1$ generates $m_0$ and $m_1$ and a $state$ using PK. 3. Defender randomly se...
Given the desire to have unique salts for each user of your system, is it actually necessary to create a cryptographically-random salt for each user? If your system already has some other unique user identifier (be it an ID, user-name, or an Email address) is there any effective decrease in your security if you simp...
There are zillions of articles describing CRC. What can I read to (more deeply) understand what's really going on? Both from an algebraic perspective and a bit-manipulation perspective, I'd like to understand it well enough to have an intuitive feel for it. (Also see http://crypto.stackexchange.com/questions/696/bru...
I'm working on a cryptosystem which uses IDEA. The designer made the mistake of including a CRC-32B hash of the password unencrypted in the header, so that the system can quickly reject bad passwords. Of course, that opens it up to the obvious attack of brute forcing CRC32 over potential passwords until the right one...
I stumbled upon this question in some textbook. > Propose a variant of ElGamal signature scheme such that there is no need to calculate the inverse $k^{-1}$ as it is usually done using the EEA. Recalling what ElGamal signature is about: we fix a prime number $p$ and a generator $\alpha$ of $Z_p^*$. User $A$ the...
I cannot seem to understand the role or goal of Quantum Fourier Transformation of Shor's integer factorization algorithm. Is it used to collapse all quantum states into one, in which it has a factor of a given input $n$?
What role plays Quantum Fourier Transformation in attacking Shor's integer factorization algorithm?
Shamir's Secret Sharing allows a secret to be split into multiple shares so that it can be reconstructed later. Is there a way to do the reverse? Can we combine a few secrets first and later split them into their original forms? More clearly: given two strings I want to "pack" them into single secret and later spli...
I was just reading the [Stick Figure Guide to AES][1] and came across an interesting table explaining how the winner was chosen: ![stick figure aes][4] Unfortunately the NIST site is down so I can't gain further information about the approval process so I was hoping someone here would know in more detail. - W...