instruction stringlengths 15 30k |
|---|
I understand how the RSA algorithm works for encryption and decryption purposes but I don't get how signing is done.
Here's what I (think) I know and is common practice:
* If I have a message that I want to sign, I don't sign the message itself but I create a hash of it and then sign that hash by using my privat... |
How does RSA signature verification work? |
> Why is it common practice to create a hash of the message and sign that instead of signing the message directly?
Well, the RSA operation can't handle messages longer than the modulus size. That means that if you have a 2048 bit RSA key, you would be unable to directly sign any messages longer than 256 bytes long ... |
> Why is it common practice to create a hash of the message and sign that instead of signing the message directly?
Well, the RSA operation can't handle messages longer than the modulus size. That means that if you have a 2048 bit RSA key, you would be unable to directly sign any messages longer than 256 bytes long ... |
> Why is it common practice to create a hash of the message and sign that instead of signing the message directly?
Well, the RSA operation can't handle messages longer than the modulus size. That means that if you have a 2048 bit RSA key, you would be unable to directly sign any messages longer than 256 bytes long ... |
There is something off in your setup:
- You care about precomputation and dictionary attacks.
- You assume a password like ` puppies `.
- You didn't mention any other kind of secret.
- More formally: You didn't state an attack model. What access does the attacker have? Is there some kind of secure data storage? A... |
Will our app be FIPS 140-2 compliant with our own AES algorithm implementation? |
Will our app be FIPS 140-2 compliant if we use our own AES algorithm implementation? |
In the NSA's document, "[The Case for Elliptic Curve Cryptography][1]", we have
Symmetric Key RSA and Diffie-Hellman Elliptic Curve
Size (bits) Key Size (bits) Key Size (bits)
80 1024 160
112 2048 224
... |
Why is the P-521 elliptic curve not in Suite B if AES256 is? |
In the NSA's document, "[The Case for Elliptic Curve Cryptography][1]", we have
Symmetric Key RSA and Diffie-Hellman Elliptic Curve
Size (bits) Key Size (bits) Key Size (bits)
80 1024 160
112 2048 224
... |
What is the current standard of random bit generators? RSA relies on two large prime numbers, and I am wondering what is the algorithm used to generate such numbers? |
In the NSA's document, "[The Case for Elliptic Curve Cryptography][1]", we have
+---------------+-------------------------+-----------------+
| Symmetric Key | RSA and Diffie-Hellman | Elliptic Curve |
| Size (bits) | Key Size (bits) | Key Size (bits) |
+---------------+---------------... |
Suppose I implement RSA myself in C and I use just the formulas from number theory. What attacks would my implementation be vulnerable to? Can anyone explain this to me like I'm 5? |
Can anyone explain most popular RSA attacks like I'm 5? |
I had somehow gotten the impression that scrypt offered a separate memory-factor in addition
<br>
to its main work-factor. $\:$ However, [the (original?) scrypt paper](http://www.tarsnap.com/scrypt/scrypt.pdf) does not have such a parameter.
>Do any implementations of scrypt offer a way to limit
<br>
its memory ... |
Is there any implementation of scrypt that allows a specific limit on memory? |
I'm not sure whether you'd prefer a good academic intro, some practical guides on implementation, or some breaking research in this area, so here are my recommendations for each:
- Academic overview: [Handbook of Applied Cryptography][1] Chapter 4
- Practical implementation guidelines: [NIST's Federal Informatio... |
After saw the xkcd comic [self-description](http://xkcd.com/688/), I wonder is it theoretically possible to construct a self-descriptive string that contains its own hash value?
Let's say the string's md5 value is `663ef7d3f38cf900574cd4d9f83eb1b7`, the string would be something like:
...
The md5sum valu... |
Is it theoretically possible to construct a string that contain its own hash value? |
Answer's plan:
- re-stating the problem;
- explaining its conventional solution, using a hash published in hexadecimal, usually of 32 to 64 characters;
- explaining a better (perhaps novel) solution, combining two established cryptographic primitives (a hash and a function originally designed for [Password Based K... |
My question is partly Cryptography and partly programming, I would appreciate any help on any aspect of it :)
I want to use [PBC][1] library to do the following operations:
1. Create a finite group, with "my custom" order (Z_q).
2. Choose a random value "g" from this group.
3. Compute "g^r", where "r" is a r... |
From Wikipedia I read that the IV is used to randomise the mapping of cleartext to cipher text and that the IV is usually stored (in cleartext) together with the encrypted record. (http://en.wikipedia.org/wiki/Initialization_vector)
However if I look at a specific implementation in C# when deriving the key using Rfc... |
Is the salt value a secret or can it be stored in cleartext just like the IV? |
In [the IETF RFC draft named "SM2 Digital Signature Algorithm"](http://tools.ietf.org/html/draft-shen-sm2-ecdsa-01) a signature algorithm is specified. The RFC does however not mention why this signature algorithm has been defined. Nor does it specify what the advantages of this scheme are over ECDSA. It seems that SM2... |
In [the IETF RFC draft named "SM2 Digital Signature Algorithm"](http://tools.ietf.org/html/draft-shen-sm2-ecdsa-01) a signature algorithm is specified. The RFC does however not mention why this signature algorithm has been defined. Nor does it specify what the advantages of this scheme are over ECDSA. It seems that SM2... |
My question is partly cryptography and partly programming, I would appreciate any help on any aspect of it :)
I want to use [PBC][1] library to do the following operations:
1. Create a finite group, with "my custom" order ($Z_q$).
2. Choose a random value $g$ from this group.
3. Compute $g^r$, where $r$ is a... |
Edited (I removed the emphasize on Integers):
My question is partly cryptography and partly programming, I would appreciate any help on any aspect of it :)
I want to use [PBC][1] library to do the following operations:
1. Create a finite group, with "my custom" order ($Z_q$).
2. Choose a random value $g$ fr... |
A lot of sites (like *"users.telenet.be/d.rijmenants/en/otp.htm#creating"*), refer to 10-side dice to generate random number for [tag:one-time-pad]. I was thinking about new ways to generate random numbers,letters and passwords. here what I got…
To generate random numbers:
* Take out keys numbers from `0-9` from ... |
A lot of sites (e.g. [Dirk Rijmenants'](http://users.telenet.be/d.rijmenants/en/otp.htm#creating)) refer to 10-side dice to generate random number for [tag:one-time-pad]. I was thinking about new ways to generate random numbers, letters and passwords. here what I got…
To generate random numbers:
* Take out keys n... |
In the NSA's document, "[The Case for Elliptic Curve Cryptography][1]", we have
+---------------+-------------------------+-----------------+
| Symmetric Key | RSA and Diffie-Hellman | Elliptic Curve |
| Size (bits) | Key Size (bits) | Key Size (bits) |
+---------------+---------------... |
In the NSA's document, "[The Case for Elliptic Curve Cryptography][1]", we have
+---------------+-------------------------+-----------------+
| Symmetric Key | RSA and Diffie-Hellman | Elliptic Curve |
| Size (bits) | Key Size (bits) | Key Size (bits) |
+---------------+---------------... |
I am studying Fractal Merkle Tree Traversal algorithm in [this book][1]. In the [pag. 54] I don't understand this paragraph:
> We may determine the number of pebbles returned at these times by observing that a leaf is returned every single round, a pebble at height
> $ih + 1$ every two rounds, one at heigh... |
My question is the following:
I have calculated the average number of operations in 1 round of SHA256 as follows:
Additions: 9.25
Bitwise Rotations: 9
Bitwise Shifts: 1.5
Bitwise AND: 5
Bitwise EXOR: 10
I have certain proposals that save the following number of operations in the SHA256 algorithm for Bitcoi... |
I have calculated the average number of operations in 1 round of SHA256 as follows:
* Additions: 9.25
* Bitwise Rotations: 9
* Bitwise Shifts: 1.5
* Bitwise AND: 5
* Bitwise XOR: 10
I have certain proposals that save the following number of operations in one SHA256 evaluation (i.e. 64 rounds) for Bi... |
Can somebody explain what the "shared secret" and "password" do when opening/creating a VPN tunnel?
In this specific case I setup a VPN to my Fritz!Box and I had to provide a shared secret (which was pregenerated and very long) and a password.
I'd like to understand how each of these two credentials is used in te... |
What is the "shared secret" used for in IPSec VPN? |
How could the following scheme be made more resilient to attacks capable of utilizing massive amounts of resources?
*Assume all random values are cryptographically secure.*
**Key derivation:** scrypt using a random 16 byte nonce. The work factor is 1048576 which takes a GB of memory and ~3 seconds to compute on a... |
I'm looking for references, papers or guidance on a class of system which I have not seen widely discussed.
Consider powerful electronic machinery which remains in the custody of communicating parties, is reasonably insulated from tempest-style attacks, and which is not networked. Between tasks its state is complete... |
Here is a good guide for [deploying forward secrecy on your SSL server](https://www.net-security.org/article.php?id=1856). Here's [another good guide](https://community.qualys.com/blogs/securitylabs/2013/08/05/configuring-apache-nginx-and-openssl-for-forward-secrecy) that describes how to deploy forward secrecy for Ap... |
Let $G_1, G_2$ be additive groups and $G_T$ a multiplicative group, all of prime order $p$. Let $P $ in $G_1, Q $ in $G_2$ be generators of $G_1$ and $G_2$ respectively.
A pairing is a map:
$e:( G_1, G_2 )-->G_T $
can anyone explain it? |
what is pairing in cryptography? |
Assume that there are three user that have own **secret key di** and corresponding **Public Key Qi = di.P** such that **Qi is an point in elliptic curve** and **P is base point in elliptic curve**. now you tell me that:
Is **d1.Q2.Q3** equal to **d2.Q1.Q3** or **d3.Q1.Q2**?
|
Is d1.Q2.Q3 equal to d2.Q1.Q3 or d3.Q1.Q2? |
first, the passage you refer to is on page 55, 2nd paragraph. And it would also be great if you'd announce that figure 4.1 is actually in a different document ;-) took me quite a while to figure this out. Now to your question. So, I assume you understand the paragraph? You have to note that a round here corresponds to ... |
It [seems to be possible][1] to retrieve the (public) key used for creating an ECDSA signature just from the signature alone. (In some circumstances, the private key can be recovered as well, but that's another story...)
This seems like an interesting property; as far as I know, RSA doesn't share it.
Depending on... |
What signature schemes allow recovering the public key from a signature? |
Assume that there are three users, each with their own secret key $d_i$ and the corresponding public key $Q_i = d_i \cdot P$, such that $Q_i$ is a point on an elliptic curve and $P$ is a base point on this elliptic curve.
Is $d_1 \cdot Q_2 \cdot Q_3$ equal to $d_2 \cdot Q_1 \cdot Q_3$ or $d_3 \cdot Q_1 \cdot Q_2$?
... |
First, the passage you refer to is on page 55, 2nd paragraph. And it would also be great if you'd announce that figure 4.1 is actually in a different document ;-) took me quite a while to figure this out. Now to your question.
So, I assume you understand the paragraph? You have to note that a round here corresponds ... |
Most likely, this 'shared secret' was actually an IKE "preshared key"; it is used to authenticate the two sides (and, for IKEv1, is stirred into the keys). It actually isn't used as a key (and hence someone learning that key cannot use it to listen in, unless they perform an active Man-in-the-Middle attack).
I susp... |
Well, lets go through the issues:
> It seems to be possible to retrieve the (public) key used for creating an ECDSA signature just from the signature alone
Nope, not quite. You also need the message being signed. And, with that, it doesn't give you the unique public key; it does allow you to narrow it down to tw... |
It [seems to be possible][1] to retrieve the (public) key used for creating an ECDSA signature just from the signature alone.
This seems like an interesting property; as far as I know, RSA doesn't share it.
Depending on the application, this can both be an advantage (shorter messages, as the public key or a key i... |
Given a message $M$ and a cryptographic hash function $H$, let $f(M) = E_K(M || H(M))$ where $E_K$ is AES-128-CBC encryption with PKCS#5 padding. Take $H = \textrm{SHA-256}$ if it matters. In other words, we encrypt the message and a hash of the message, with CBC.
Does $f$ guarantee the authenticity of the message? ... |
Does CBC encryption of a hash provide authenticity? |
It would seem to a naive eye that if you have a MAC, you have a hash function: use a key that all the parties know (such as all-bits-zero).
A potential application would be a resource-constrained platform where code size is at a premium, and which needs to implement AES for confidentiality: instead of also implement... |
Why have hashes when you have MACs? |
Is it possible that two distinct RSA moduli share both of their prime factors? |
I'm using the Crypto++ implementation of Salsa20 for a software project we are working on and I'd like to know if there are any SSE or software optimizations that will increase the speed of the CSPNG? http://www.cryptopp.com/ |
Its believed that the quadratic residue modulo n=pxq for large primes p and q is intractable, which forms the basis of some cryptosystems. However, it is solvable if the factors of n are know, such that the problem modulo a prime is easy (we use the Chinese reminder theorem) to simultaneously solve the problem for each... |
Symmetric encryption schemes such as AES have known securities equal to their key sizes. Elliptic curve encryption gets halfway towards optimal: its security is half the key size.
Are there any public key encryption schemes known which have security equal to key size? If not, do any do better than ECC? |
I am wondering how can I secure communications between multiple peers over a public channel, like an IRC channel.
With two peers it is easy - they exchange their encryption keys and decrypt the secret messages using their private keys, but how would this work with multiple peers without creating excessive duplicatio... |
Assume d is a 128 bit random integer and P is base point of an elliptic curve and Q = dP is a point on the elliptic curve and SHA-1 is a hash function with 128 bit output, my question is:
Is size Q equal to size SHA-1(Q)?
If not, then wich is smaller size?
|
Is size Q equal to size SHA-1(Q)? |
Assume d is a 128 bit random integer and P is base point of an elliptic curve and Q = dP is a point on the elliptic curve and SHA is a hash function with 128 bit output, my question is:
Is size Q equal to size SHA(Q)?
If not, then wich is smaller size?
|
Is size Q equal to size SHA(Q)? |
The question appears to be: we have algorithms that determine where $a$ is a quadratic residue modulo a prime $p$; what happens if we run the same algorithm, but instead of giving it a prime $p$, we give it a composite number $N$?
Well, there actually two common algorithms used to determine whether a value is a quad... |
The question appears to be: we have algorithms that determine where $a$ is a quadratic residue modulo a prime $p$; what happens if we run the same algorithm, but instead of giving it a prime $p$, we give it a composite number $N$?
Well, there actually two common algorithms used to determine whether a value is a quad... |
If an adversary holds thousands of encrypted files that were encrypted with the same cipher, can he determine which cipher method had been used on the files?
Assume that the adversary has no prior knowledge about the encryption environment.
Details:
Let's say I have a encryption program that allows me to select 1 ... |
Do ciphertexts leak information about their algorithmic creators? |
Without pairings, there is no known single round tripartite key-exchange algorithm. However, it is possible to do it in two-rounds. For example, refer to the Burmester-Desmedt conference key protocol (http://www.cs.fsu.edu/~burmeste/eurocrypt_plus_proof.pdf) which in fact works for an arbitrary number of users.
This... |
I'm using the Crypto++ implementation of Salsa20 for a software project we are working on and I'd like to know if there are any SSE or software optimizations that will increase the speed of the CSPNG? |
I'm using the [Crypto++](http://www.cryptopp.com/) implementation of Salsa20 for a software project we are working on and I'd like to know if there are any SSE or software optimizations that will increase the speed of the CSPNG? |
Note that a block cipher is not an encryption algorithm. It's a building block. To get encryption you need a mode-of-operation that uses that block cipher. For example CBC-AES128 (and even here, it's not clear how the IV is being generated).
Many encryption algorithms overtly leak their identity. Some have packa... |
Typically,I think latency should mean the time from the first plaintext input to the first ciphertext output, when the block cipher is not totally unrolled (such as AES unrolled with 2 rounds).
If I use a pipeline to increase the throughput, the latency should relate to the amount of pipelined data. E.g. with AES un... |
What does ''latency'' really mean when a block cipher is partially unrolled? |
I have an application written in C, running in Linux. It uses `IPsec (EPS)` (manually putting the IPSec packet together) to send certain packets. The algorithm used for encrypting the payload is `3DES-CBC` (using `Libgcrypt`).
So my doubts are regarding the `IV` that I have to use. For this scheme to be secure:
I... |
I have an application written in C, running in Linux. It uses `IPsec (EPS)` (manually putting the IPSec packet together) to send certain packets. The algorithm used for encrypting the payload is `3DES-CBC` (using `Libgcrypt`).
So my doubts are regarding the `IV` that I have to use. For this scheme to be secure:
I... |
In short, short keys are susceptible to a certain class of attacks, key information over 2048 bits is just getting discarded (and long keys are susceptible to a different class of attacks), and exotic keys (those not aligned to bytes) are really either getting aligned to bytes by your implementation, or are just a very... |
In short, short keys are susceptible to a certain class of attacks, key information over 2048 bits is just getting discarded (and long keys are susceptible to a different class of attacks), and exotic keys (those not aligned to bytes) are really either getting aligned to bytes by your implementation, or are just a very... |
I have an application written in C, running in Linux. It uses `IPsec (ESP)` (manually putting the IPSec packet together) to send certain packets. The algorithm used for encrypting the payload is `3DES-CBC` (using `Libgcrypt`).
So my doubts are regarding the `IV` that I have to use. For this scheme to be secure:
I... |
This is a program that I found which takes a purely alphabetical message, converts the letters to their ASCII values and combines them with the ASCII values of an alphabetical key (wrapping around when it gets to Z):
https://github.com/Wideshanks/onetimePad/
And this file contains the encrypting part of the javas... |
Implementing a one-time pad without binary? |
To generate an IV securely for CBC mode, there are two obvious ways to do it (and both are cited by NIST):
- For each packet, select a nonce (the IPSec sequence number, padded out to 64 bits, works fine), encrypt that in EBC mode, and then use resulting ciphertext block as the IV. An equivalent way to do that is to... |
In the "[Telegraphic Code to Insure Privacy and Secrecy in the Transmission of Telegrams][1]" from 1882, Frank Miller assigned a number to around 14,000 code words. Bankers would select an "irregular" series of such words and exchange them with a remote partner. Any messages would be lined up below the next unused word... |
No, giving your users the ability to choose the encryption scheme, and telling them to choose a less common block cipher, will *not* increase the security strength. As long as each option is equally strong, it will however not decrease the security strength, compared to if there is only one option for the encryption sc... |
No, giving your users the ability to choose the encryption scheme, and telling them to choose a less common block cipher, will *not* increase the security strength. As long as each option is equally strong, it will however not decrease the security strength, compared to if there is only one option for the encryption sc... |
In the "[Telegraphic Code to Insure Privacy and Secrecy in the Transmission of Telegrams][1]" from 1882, Frank Miller assigned a number to around 14,000 code words. Bankers would select an "irregular" series of such words and exchange them with a remote partner. Any messages would be lined up below the next unused word... |
Lets say I want to build a simple chat program that has encryption that is impossible to crack for anyone, even a theoretical government with a massive super computer. Ok here's my idea. You'll need to read all the points to get the whole picture I think.
- Only two people can communicate with each other with the c... |
Would this simple encrypted chat program be feasible using One Time Pads? |
Ok hypothetical scenario. Lets say I want to generate a lot of key material quickly for a one-time pad. This key material will be divided up and used for many different messages in the future.
**1)** I select 50-100+ songs out of a custom playlist of all my music. The music has been converted to basic Waveform Audio... |
Does a playlist of songs or movies mixed together contain enough random enough for OTP key material? |
To generate an IV securely for CBC mode, there are two obvious ways to do it (and both are cited by NIST):
- For each packet, select a nonce (the IPSec sequence number, padded out to 64 bits, works fine), encrypt that in ECB mode, and then use resulting ciphertext block as the IV. An equivalent way to do that is to... |
Symmetric encryption schemes such as AES have known security levels equal to their key sizes (i.e. breaking an encryption with an $n$ bit key needs about $2^n$ work steps). Elliptic curve encryption gets halfway towards optimal: its security is half the size of the public key.
Are there any public key encryption sc... |
Is there a public key encryption scheme with optimal key size? |
This is a program that I found which takes a purely alphabetical message, converts the letters to their ASCII values and combines them with the ASCII values of an alphabetical key (wrapping around when it gets to Z).
{**EDIT**: I should emphasize here that the key being used is fully random and is at least a long ... |
Where does the word or acronym Keccak come from?
1. Guido Bertoni, Joan Daemen, Michael Peeters, and Gilles Van Assche. Keccak sponge function family main document. Submission to NIST (updated), 2009.
2. "NIST Selects Winner of Secure Hash Algorithm (SHA-3) Competition". NIST 10/2/2012. |
What is the origin of the word "Keccak"? |
Sysadmins have switched from one password hash algorithm to another many times.
There is a standard process for this switch.
The Modular Crypt Format (MCF) is the standard scheme for formatting encrypted passwords, as used by passwd, crypt, etc.
(see http://crypto.stackexchange.com/questions/2968/why-are-there-sig... |
Yes, you can have a key of any length of that range (as long as it is an even number of bytes), but really, why? There is absolutely no reason to.
* If the key is uniformly distributed, anything over 256 bits is total overkill and completely pointless.
* If the key is not uniformly distributed (maybe it's a pass... |
Its believed that the quadratic residue modulo $n=p·q$ for large primes $p$ and $q$ is intractable, which forms the basis of some cryptosystems.
However, it is solvable if the factors of $n$ are know, such that the problem modulo a prime is easy (we use the Chinese reminder theorem) to simultaneously solve the probl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.