instruction stringlengths 15 30k |
|---|
I need MGF1 and OS2IP functions, as defined in the [PKCS #1 v2.1: RSA Cryptography Standard][1].
Is there anything available in [OpenSSL][2], or any other open C library?
[1]: http://www.rsa.com/rsalabs/node.asp?id=2125
[2]: http://www.openssl.org/ |
Are there any MGF1 and OS2IP functions available in C? |
The [original article][1] neglects the cost of DES computations (there are less than $2^{90}$) and everything except memory accesses to its _Table 1_ and _Table 2_. I go one step further: considering that _Table 1_ is initialized only once and then read-only, it could be in ROM, and I neglect all except the accesses to... |
The [original article][1] neglects the cost of DES computations (there are less than $2^{90}$) and everything except memory accesses to its _Table 1_ and _Table 2_. I go one step further: considering that _Table 1_ is initialized only once and then read-only, it could be in ROM, and I neglect all except the accesses to... |
The [original article][1] neglects the cost of DES computations (there are less than $2^{90}$) and everything except memory accesses to its _Table 1_ and _Table 2_. I go one step further: considering that _Table 1_ is initialized only once and then read-only, it could be in ROM, and I neglect all except the accesses to... |
I'm building a system that has to take file paths, and generate a unique name for each one. I'm planning on using SHA1 as the hash function. My question is: do I have to deal with possible collisions (2 different paths producing the same SHA1 value) or can I assume it won't occur? |
[Here][1] it is mentioned that DSA cannot be used for encrypt. But Both RSA and DSA can be used to generate public and private keys, right ? (Or am I wrong ?). Then why can't I use the DSA public key to encrypt ?
[1]: http://stackoverflow.com/questions/2841094/what-is-the-difference-between-dsa-and-rsa |
Why DSA cannot encrypt? |
<i>how -10+22X+22X^3-22X^6 may be 1 (modulo 11) if 22 = 0 mod 11?</i>
Because when you reduce this mod 11 you get
1 + 0 X + 0 X^3 + 0 X^6 = 1.
You seem to think that saying a polynomial is 1 mod 11 means that all its terms are 1 mod 11. What it actually means is that the constant term is 1 mod 11, and all the... |
[Here][1] it is mentioned that DSA cannot be used for encrypt. But Both RSA and DSA can be used to generate public and private keys, right? (Or am I wrong?). Then why can't I use the DSA public key to encrypt?
[1]: http://stackoverflow.com/questions/2841094/what-is-the-difference-between-dsa-and-rsa |
Why DSA cannot be used for encryption? |
How were the AES flavours selected? |
I use AES with AES/CBC/PKCS5Padding with the following encryption and decryption code sections in Java:
cipher.init(Cipher.ENCRYPT_MODE, keySpec, new IvParameterSpec(IV1));
cipher.init(Cipher.DECRYPT_MODE, keySpec, new IvParameterSpec(IV2));
where IV1 and IV2 are randomly generated 16-byte initializati... |
CBC mode is a method of encrypting messages of arbitrary length; it can handle messages longer than 16 bytes, and it takes an fixed length IV (16 bytes in the case of AES) for each message. So, if the question is "how does CBC work for messages longer than 16 bytes (even if the IV is only 16 bytes)", the obvious answe... |
How were the AES key and block length subsets of Rijndael selected? |
The AES key lengths were specified in the original [Request for Candidate Algorithm Nominations for the AES](http://cryptome.org/jya/aes_9709.htm) published in the Federal Register on September 12, 1997, in [section 3, _Minimum Acceptability Requirements_](http://cryptome.org/jya/aes_9709.htm#sec3) (emphasis original):... |
Prompted by [Paŭlo's comment](http://crypto.stackexchange.com/questions/2593/how-were-the-aes-key-and-block-length-subsets-of-rijndael-selected/2597#comment4396_2593), I took a look at the original requirements set out for the AES candidates. A useful page for that turns out to be [AES - The Early Years (1997-98)](htt... |
Prompted by [Paŭlo's comment](http://crypto.stackexchange.com/questions/2593/how-were-the-aes-key-and-block-length-subsets-of-rijndael-selected/2597#comment4396_2593), I took a look at the original requirements set out for the AES candidates. A useful page for that turns out to be [AES - The Early Years (1997-98)](htt... |
Assuming that $K_{n}$, $P_{n}$, and $C_{n}$ are individual bytes of the key, plaintext, and ciphertext respectively.
The first byte of ciphertext is computed like this:
$C_{1} = K_{1} \oplus P_{1}$
And the rest of the bytes are computed like this:
$C_{i} = K_{i} \oplus P_{i} \oplus P_{i-1}$
Is this a goo... |
Is This Algorithm Secure at All? |
To answer your question:
> Does a public key absolutely need to be used to initiate an encrypted session?
No. It is sufficient that the client and the server have *"a shared secret"*.
The server can encrypt a random (rotating session) key with the *shared secret*, and send it to the client. The client can the... |
Is XOR in a CBC-like mode secure? |
Well, that transform can be viewed as an unkeyed transform of the plaintext, followed by exclusive-or'ing the key. It would also appear to have the same limitations as the usual key exclusive-or; how it works out depends on the details of the key:
- If the key is as long as the plaintext, and is chosen at random, t... |
Suppose Alice seeds a cryptographically strong Pseudo Random Number Generator with a truly random number, and keeps it secret. Alice then uses the output of the PRNG to generate several 256-bit numbers in sequence. Each of those 256-bit numbers is then used as an ECDSA private key, public keys are generated from them, ... |
Can A PRNG Be Used To Generate Multiple Private Keys for ECDSA? |
I was looking at the [algorithm for Twofish](http://upload.wikimedia.org/wikipedia/commons/e/ee/Twofishalgo.svg), and I noticed that in some places a XOR is used, but in others, they use "addition modulo-32." What makes modulo-32 special? Why not always use XOR? Why not always addition mod 32? |
Why Addition Mod 32? |
The combination between addition modulo $2^{32}$ (not modulo $32 = 2^5$) - indicated by $\boxplus$ in the diagram - and XOR (i.e. bitwise addition modulo $2$) - indicated by $\oplus$ - makes the algorithm more non-linear.
Each of them for itself is a linear operation, but over different fields ($G(2^{32})$ vs. $GF(2... |
Is there a standard way to determine a complexity of the specified SAT problem? I'm researching algebraic cryptanalysis and came to solving multivariate quadratic equation systems using CryptoMiniSat. However it would nice to evaluate a complexity of the full cipher equation system. Does it only depend on the number of... |
The [original article][1] neglects the cost of DES computations (there are less than $2^{90}$) and everything except memory accesses to its _Table 1_ and _Table 2_. I go one step further: considering that _Table 1_ is initialized only once and then read-only, it could be in ROM, and I neglect all except the accesses to... |
Is it true that breaking a 1024 bit rsa key is as difficult as breaking a 128 bit symmetric key(des). I know that breaking a rsa key is equivalent to factorizing the `modulus N`. To factorize it you only have to see if any number from `2 - N/2` divides N, right? But that would still be grater than `2^128` trials(which ... |
Is it true that breaking a 1024 bit rsa key is as difficult as breaking a 128 bit symmetric key(des). I know that breaking a rsa key is equivalent to factorizing the `modulus N`. To factorize it you have to see if any number from `2 - N/2` divides N, right? But that would still be much greater than `2^128` trials(whic... |
The combination between addition modulo $2^{32}$ (not modulo $32 = 2^5$) - indicated by $\boxplus$ in the diagram - and XOR (i.e. bitwise addition modulo $2$) - indicated by $\oplus$ - makes the algorithm more non-linear.
Each of them for itself is a linear operation, but over different fields ($GF(2^{32})$ vs. $GF(... |
Is it true that breaking a 1024 bit rsa key is as difficult as breaking a 128 bit symmetric key(AES). I know that breaking a rsa key is equivalent to factorizing the `modulus N`. To factorize it you have to see if any number from `2 - N/2` divides N, right? But that would still be much greater than `2^128` trials(whic... |
Following [@poncho][1]'s nice clarification of the RSA speedup [here][2], let's see if I'm able to do the same in the case of the [DGK cryptosystem][3]:
- We have pk = (n, g, h, u), sk = (p, q, $v_p$, $v_q$) which are generated as following:
- we have 3 numbers, $k > t > l$
- we pick u as the next prime gr... |
Is it true that breaking a 1024-bit RSA key is as difficult as breaking a 128 bit symmetric key (e.g. AES)? I know that breaking a RSA key is equivalent to factoring the modulus $N$. To factor it, you have to see if any number between $2$ and $N/2$ divides $N$, right? But that would still be much greater than $2^{128}... |
The [original article][1] neglects the cost of DES computations (there are less than $2^{90}$) and everything except memory accesses to its _Table 1_ and _Table 2_. I go one step further: considering that _Table 1_ is initialized only once and then read-only, it could be in ROM, and I neglect all except the accesses to... |
Following [@poncho][1]'s nice clarification of the RSA speedup [here][2], let's see if I'm able to do the same in the case of the [DGK cryptosystem][3]:
- We have pk = (n, g, h, u), sk = (p, q, $v_p$, $v_q$) which are generated as following:
- we have 3 numbers, $k > t > l$
- we pick u as the next prime gr... |
As it turns out, this is just a beginner question and I think I managed to figure it out. Since $E(m,r) = g^mh^r \pmod n$, I can just split it in two: $E(m,r) = (g^m \pmod n) (h^r\pmod n)$ and then apply the CRT trick on both sides, after which I can multiply the results together to get back the original:
$E_{nonran... |
For MD5 two different inputs are known that produce the same 160 bit hash value. However, these inputs are artificially created for this specific purpose.
For normal, real life inputs I believe no such collision is known?
When you only consider the first n bits of the hash however certainly such collisions are kn... |
Accidental collisions are interesting for certain applications, and one would expect accidental collisions to occur less frequently in a system than malicious collisions.
So, if you are not worried about malicious collisions, only accidental, it is easy to compute how many digests you would need to compute before se... |
Accidental collisions are interesting for certain applications, and one would expect accidental collisions to occur less frequently in a system than malicious collisions.
So, if you are not worried about malicious collisions, only accidental, it is easy to compute how many digests you would need to compute before se... |
> Bob and Alice each have a bit string they want to keep private. They each want to know what the bitwise AND of their two strings would be without telling the other or anyone else listening to their exchange their actual bit strings... how can they do this? Keep in mind that even once they both hold the AND of their t... |
For MD5 two different inputs are known that produce the same 128 bit hash value. However, these inputs are artificially created for this specific purpose.
For normal, real life inputs I believe no such collision is known?
When you only consider the first n bits of the hash however certainly such collisions are kn... |
I study elliptic curves problematics, which also includes study of related protocols such as ECIES. A there is a problem I dont understand operation **||**. What this operation mean?
Some stuff is mentioned on wikipedia http://en.wikipedia.org/wiki/Integrated_Encryption_Scheme but this algoritm is better explain in... |
I am studying elliptic curves problems, which also includes study of related protocols such as ECIES. A there is a problem I dont understand operation `||`. What this operation mean?
Some stuff is mentioned on wikipedia http://en.wikipedia.org/wiki/Integrated_Encryption_Scheme but this algoritm is better explain in... |
ECIES protocol - what does the || operation mean? |
Below is the cipher text I am trying to break and as you can see its rather short which is why I am having so much trouble.
WOYFN ZCMSH VUVTG BFUTW ABTZP FHIMF TFOSU UXFQC HKVKG MPUUQ MHRXI OVBRZ EPJYF KKVJW GEIOV HUKEB JUNSM THIMF TFKUB ULMMQX
What I know about this ciphertext:
- Key is 6 characters long... |
> "how $-10+22X+22X^3-22X^6$ may be 1 (modulo 11) if 22 = 0 mod 11?"
Because when you reduce this mod 11 you get
$$1 + 0 X + 0 X^3 + 0 X^6 = 1.$$
You seem to think that saying a polynomial is 1 mod 11 means that all its terms are 1 mod 11. What it actually means is that the constant term is 1 mod 11, and all t... |
I've been trying a long time to understand a thing which is obviously extremely simple, but I just can't get it.
Read this, please:
> The NTRUEncrypt PKCS uses the ring of truncated polynomials $R$ combined with the modular arithmetic described in Section 1. These are combined by reducing the coefficient... |
I am studying elliptic curves problems, which also includes study of related protocols such as ECIES. A there is a problem I don't understand operation $||$. What this operation mean?
Some stuff is mentioned on [Wikipedia's Integration Encryption Scheme article][1], but this algoritm is better explain in book Guide... |
Using small private exponents with RSA improves performance.
However, it has been shown (Wiener, 1990) that if $\log d \leq \frac14 \log N$, the private exponent $d$ can be reconstructed from the public key $(N,e)$.
Smart, Inc. uses special private keys designed such that they are:
* Larger than the minimum bo... |
Is Wiener's attack on RSA extendable to larger keys with low hamming weight? |
Can $n=pq$ be part of two different pairs of RSA keys?
If such keys exist, say $(e_1,n)$ and $(e_2,n)$, how are they related?
What will be the security concerns for the two users?
|
Can two different pairs of RSA key have the same modulus? |
How can I process Initialization Vector inside the *Block Cipher Encryption* box (using for example AES) together with the Key?
![OFB image from Wikipedia][1]
[1]: https://i.stack.imgur.com/hTbsT.png
Will I encrypt the Initialization Vector like a block of plaintext?
So I can generate a keystream, which ... |
How does Output Feedback mode use the initialization vector? |
The [abstract of the Biclique Attack paper](http://research.microsoft.com/en-us/projects/cryptanalysis/aes.aspx) claims:
> The first key recovery attack on the full AES-128 with computational complexity $2^{126.1}$.
What does $2^{126.1}$ mean in this context? And where does this value come from? |
How was the complexity of the Biclique Attack calculated? |
Following [@poncho][1]'s nice clarification of the RSA speedup [here][2], let's see if I'm able to do the same in the case of the [DGK cryptosystem][3]:
- We have pk = (n, g, h, u), sk = (p, q, $v_p$, $v_q$) which are generated as following:
- we have 3 numbers, $k > t > l$
- we pick u as the next prime gr... |
**The problems:**
* The Discrete Logarithm problem: Given $y$, find $x$ so that $g^x = y$.
* The Computational Diffie-Hellman problem: Given $y_1 = g^{x_1}$ and $y_2 = g^{x_2}$ (but not $x_1$ and $x_2$), find $y = g^{x_1·x_2}$.
* The Decisional Diffie-Hellman problem: Given $y_1, y_2, y_3$, decide if they are of t... |
**The problems:**
* The Discrete Logarithm problem: Given $y$, find $x$ so that $g^x = y$.
* The Computational Diffie-Hellman problem: Given $y_1 = g^{x_1}$ and $y_2 = g^{x_2}$ (but not $x_1$ and $x_2$), find $y = g^{x_1·x_2}$.
* The Decisional Diffie-Hellman problem: Given $y_1, y_2, y_3$, decide if they are of t... |
> [Lamport signature][1]: **Signing the message** Note that now Alice's private key is used and should never be used again. The other 256 random numbers that she did not use for the signature she must never publish or use. Preferably she should delete them; otherwise, others gaining access to them would later be able t... |
Lamport signature: How many signatures are need to forge a signature? |
SSL 3.0 and TLS 1.0 used an insecure scheme to generate implicit IVs when encrypting records in CBC mode: They used the last part of the previous record, a value that can be predicted by the attacker. This attack was demonstrated in the BEAST attack.
To avoid these issues, TLS 1.1 and later use explicit IVs, which a... |
Why do new versions of TLS use an explicit IV for CBC suites? |
Each additional signature halves the security level.
A security level of about 64 bits can be broken by a determined attacker, and a level of 32 bits can be trivially broken on a single home computer.
So if you use 256 pairs, which is a reasonable level, since it offers 256 bit security against second-preimage at... |
Each additional signature halves the security level.
A security level of about 64 bits can be broken by a determined attacker, and a level of 32 bits can be trivially broken on a single home computer.
So if you use 256 pairs, which is a reasonable level, since it offers 256 bit security against second-preimage at... |
What do you mean by forge? If you are asking about (the common) existential forgery, then two message, signature pairs are enough, given that the messages differ in at least two bits.
As an example consider that you have the signatures for $m_1 = 1111$ and $m_2 = 1100$.
Considering the preimages you now have, you c... |
can anyone help me?
how to generate a session key between two nodes in two different subnet when the nodes dont know each other directly??. they know each other via a link between subnets using diffie hellman algorithm. |
gererating session key using diffie hellman algorithm? |
> Let $p = kq + 1$ and $q$ be primes such that $log$ $q = n$, $log$ $k =
> n$ and such that the bit size of every prime factor of $k$ is bounded
> by $log$ $n$. Let $g$ be a generator of the unique subgroup of $Z^*_p$
> of order $q$.
>
> $x \in$ $Z_q$ is picked randomly and you get $y = g^x$.
>
> You may ask ... |
I have a HTML page(A Form) where user will enter his details. Details to enter are <br>Name<br>age<br>salary<br>state<br>City<br> Now when user enters all details and click **Button** then I will create xml file containing the user details like
<root>
<name>abc</name>
<age>40</age>
<salary>20000<... |
XSLT tranform in xmlsignature form, a part of xmldocument? |
> Let $p = kq + 1$ and $q$ be primes such that $log$ $q = n$, $log$ $k = n$ and such that the bit size of every prime factor of $k$ is bounded
> by $log$ $n$. Let $g$ be a generator of the unique subgroup of $Z^*_p$
> of order $q$.
>
> $x \in$ $Z_q$ is picked randomly and you get $y = g^x$.
>
> You may ask any... |
The number of AES rounds increases with the key length. Why increase the number of rounds at all, and how were these round counts chosen? |
How were the number of rounds for different key sizes of AES selected? |
Following [@poncho][1]'s nice clarification of the RSA speedup [here][2], let's see if I'm able to do the same in the case of the [DGK cryptosystem][3]:
- We have pk = (n, g, h, u), sk = (p, q, $v_p$, $v_q$) which are generated as following:
- we have 3 numbers, $k > t > l$
- we pick u as the next prime gr... |
I detailed [here][1] the DGK (Ivan Damgård, Martin Geisler and Mikkel Krøigaard) cryptosystem, and I managed to get it to work, most of the time...
The BIG problem that I am facing at the moment is that the key generation algorithm sometimes produces bad keys. The paper states that:
- we generate $h$ of order $v_... |
Does the order of a block cipher cascade (e.g. in TrueCrypt) make a difference to the security provided, assuming independant keys?
For example:
Plaintext -> Rijndael -> Serpent -> 3DES -> Ciphertext
Plaintext -> 3DES -> Serpent -> Rijndael -> Ciphertext
The same ciphers, just ordered differently.
... |
Does the order of a block cipher cascade (e.g. in TrueCrypt) make a difference to the security provided, assuming independant keys?
For example:
Plaintext -> Rijndael -> Serpent -> 3DES -> Ciphertext
Plaintext -> 3DES -> Serpent -> Rijndael -> Ciphertext
The same ciphers, just ordered differently.
... |
What are the properties a generator $g$ should have to be secure for ElGamal signatures (original scheme)?
I am aware that it is poorly chosen and not secure when $g|p-1$ or $g^{-1}|p-1$, where $p$ is the large prime so that $g$ generates $Z_p^*$.
Are there other properties one should consider? Additionally, shou... |
What are the properties a generator $g$ should have to be secure for ElGamal signatures (original scheme)?
I am aware that it is poorly chosen and not secure when $g|p-1$ or $g^{-1}|p-1$, where $p$ is the large prime so that $g$ generates $Z_p^*$ and $g$ has maximum order (that is, $p-1$).
Are there other propert... |
I'll give a sketch of the solution to a quite similar problem (that makes more sense to me). The purpose of this modified problem is to show that it is essential to take $g$ of order exactly $q$ in the given setup, as one otherwise gets an oracle returning $u^x$ given $u$ as in your problem. (I'll show the connection b... |
Why don't you use SecureRandom generator (if you're on Linux/Android and Java)?
SecureRandom sr=SecureRandom.getInstance("SHA1PRNG");
byte[] IV=new byte[length_of_IV];
sr.nextBytes(IV);
Then IV will contain strongly random bytes.
Note: Don't forget to use dev/urandom rather than dev/random in yo... |
Suppose I'm developing an app to secure a lot of documents. These documents were encrypted (say, using AES) with a key X.
This key X is basically the password that the user enters before wanting to view any particular document, because that doc need to be decrypted using X.
If the user wishes to change the key X ... |
It matters in the case where one of the ciphers is broken more than the other two.
Lets suppose that for some reason there was an attack on 3DES that reduced it's key space to $2^{20}$ and the other Rijndael/AEs and Serpent to $2^{56}$. Further, for simplicity, suppose that we have only two possible messages $m_1$... |
i'm trying to figure out what is time complexity of RC4 Encryption & Decryption Algorithm? O(..)?
thanks guys |
What is Time Complexity of RC4 Encryption & Decryption Algorithm? |
I noticed recently that a couple of pieces of encryption software (TrueCrypt being one of them) don't directly use a hash of the password as the key for the block cipher. Instead, they generate a random key, use that to encrypt the data, then xor the key with the hash of the password and store the result within the enc... |
Hash decrypts key, key decrypts cipher... why? |
It matters in the case where one of the ciphers is broken more than the other two.
Lets suppose that for some reason there was an attack on 3DES that reduced it's key space to $2^{20}$ and the other Rijndael/AES and Serpent to $2^{56}$. Further, for simplicity, suppose that we have only two possible messages $m_1$... |
I need to store some sensitive data for a program. For each copy of the program, there will be a unique key for encrypting one (and only one) file using AES encryption (OFB). The key will not be changed (probably forever).
Is it secure if the hash value of the key is used as the IV?
Update:
The key is computer g... |
Is it secure to use the hash of key as the IV in AES encryption? |
Consider a common practically-collision-resistant [Merkle–Damgård][1] hash function $H$ (e.g. [SHA-1][2], [RIPEMD-160][3], [SHA-256][4], [SHA-512][5]). We define a [Message Authentication Code][6] $C$ that transforms message $m$ into $$C(m) = H(m||k)$$ where $||$ denotes concatenation and $k$ is a secret key (constant,... |
Attacks of the MAC: m->H(m||k) for common hashes H? |
Is every output of a hash function (e.g. SHA1, MD5, etc) guaranteed to be possible, or, conversely, are there any output values that cannot possibly be created from any input? If so, what guarantees this? If not, is it possible to discover such impossible outputs via an attack faster than bruteforce? |
Is every output of a hash function possible? |
I noticed that PGP signatures have a "signed on" field. I was wondering if this is "trustworthy" information and if so how is it accomplished.
For example, I can't see how it could be trusted because someone could sign something a year ago and transmit it now or they could generate a fake date and I don't see how a... |
Is the "Signed on date" of a PGP Signature Verified? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.