instruction
stringlengths
15
30k
I use PBKDF2-SHA512 with an iteration count of 128,000 to hash my passwords. I use a CSPRNG to generate a salt per password. However, I am unsure about the ideal size of the salt. I have read **a lot of** things about the salt size, but I have been unable to find a definitive answer. All of them agree that there is a m...
In [ “Towards quantum-resistant cryptosystems from supersingular elliptic curve isogenies"][1] by DeFeo, Jao and Plut, a reduction from the Decisional Supersingular Product (DSSP) problem to Decisional Supersingular Isogeny (DSSI) problem is mentioned. However, I could not find such a reduction anywhere, or even some ...
If I understand your question correctly, you are essentially asking if points in Edwards and Montgomery curves can be represented in Weierstrass coordinates. This is true; in fact, *any* elliptic curve over a prime field can be represented in Weierstrass form $\mathcal{E}_{w}^{a, b} : y^2 = x^3 + ax + b$, and by extens...
The POODLE attack uses the way block ciphers in CBC mode are decrypted in combination with the packet's padding to determine some byte's value. From what I understand, even TLS 1.1 can be vulnerable (when using a suite such as DES with CBC). Why aren't other cipher suites that use CBC vulnerable? From the followi...
This question is in relation to Wikipedia article on [Format Preserving Encryption][1] It says the following *"It is also possible to make a FPE algorithm using a Feistel network. A Feistel network needs a source of pseudo-random values for the sub-keys for each round, and the output of the AES algorithm can be us...
Using a hash (like SHA-256) vs AES as the source for pseudo-random values in Feistel network?
This question is in relation to Wikipedia article on [Format Preserving Encryption][1] It says the following > It is also possible to make a FPE algorithm using a Feistel network. A Feistel network needs a source of pseudo-random values for the > sub-keys for each round, and the output of the AES algorithm can ...
A Feistel network is a way of constructing an invertible permutation from a (possibly non-invertible) function. If the function used is pseudorandom and has a large domain, then 3-4 rounds yields a pseudorandom permutation (3 rounds suffice if the adversary can only ask "compute" queries, and 4 rounds are needed if the...
F5 BIG-IP devices suffer from a vulnerability in which [not all bytes of the Finished packet in a TLS connection are validated](https://support.f5.com/kb/en-us/solutions/public/16000/900/sol16970.html). The sort-of technical description [can be found here](https://vivaldi.net/en-US/blogs/entry/the-poodle-has-friends). ...
What is the impact of a server not fully verifying the data in the Client Finished packet of a TLS connection?
Could someone explain the main differences between Key Policy Attribute Based Encryption (KP-ABE) and Ciphertext Policy Attribute Based Encryption using an example? I know that KP-ABE depends on the private keys associated with the person trying to decrypt the message while the CP-ABE depends more on the attributes...
NaCl and libsodium libraries use Curve25519 for authenticated encryption (actually for sharing a key which is used for encryption) and Ed25519 for signatures. What is the purpose of using different primitives for these operations? Why just not to use the same primitive for both key-sharing and signatures? Are there ...
Why Curve25519 for encryption but Ed25519 for signatures?
Depending on your trust assumptions about this server, you might be able to use *cryptographic accumulators* which provide constant-sized (non)membership proofs. However, as far as I know, no efficient **strong** accumulator scheme has been developed yet. Most accumulator constructions rely on the RSA assumption wh...
> What is stopping someone from saving encrypted info, and decoding it later? Nothing. That's exactly why certain three letter institutions build large data centers... Waiting for the first large quantum computer to be built or for new attack techniques that allow to break e.g. RSA for the key sizes used today. >...
> What is stopping someone from saving encrypted info, and decoding it later? Nothing. That's exactly why certain three letter institutions build large data centers... Waiting for the first large quantum computer to be built or for new attack techniques that allow to break e.g. RSA for the key sizes used today. >...
Depending on your trust assumptions about this server, you might be able to use *cryptographic accumulators* which provide constant-sized (non)membership proofs. However, as far as I know, no efficient **strong** accumulator scheme has been developed yet. Most accumulator constructions rely on the RSA assumption wh...
Let's consider the CTR mode. For a faster encryption/decryption, is it preferable to use the decryption operation of AES, or its encryption ?
May be a silly doubt, please rectify my confusion regarding below problem: If g=2; p=11; a=6; and x=9; A = g^a mod p = 2^6 mod 11 = 9; X = g^x mod p = 2^9 mod 11 = 6; C = A^x mod p = 9^9 mod 11 = 5; To find X (i.e. g^x) using **C** and **a** only is: X' = C^(a^(-1)) mod p = 5^6^(-1) mod 11 = 5^2 mod 11 ...
Confusion regarding computing Multiplicative Inverse Modulo P?
I am using FIPS based OpenSSL module for encryption of sensitive data for my desktop socket server and client applications. I am using ECDH for key agreement.The keys public and private pair is generated for server and client on same curve NID_secp521r1. Now I want to exchange the public key between client and server a...
May be a silly doubt, please rectify my confusion regarding below problem: For concreteness assume $g=2, p=11, a=6$ and $x=9$ $$A = g^a \bmod p = 2^6 \bmod 11 = 9$$ $$X = g^x \bmod p = 2^9 \bmod 11 = 6$$ $$C = A^x \bmod p = 9^9 \bmod 11 = 5$$ To find $X$ (i.e. $g^x$) using $C$ and $a$ only is:<br> $X' =...
I know we can hide information in the inter-packet delays, e.g. we can generate a code-book that each code-word corresponds to a message and is generated by realization of a specific random process. Is there a good comprehensive resource about coding schemes? For example for Poisson process, or other processes? ...
Depending on your trust assumptions about this server, you might be able to use *cryptographic accumulators* which provide constant-sized (non)membership proofs. However, as far as I know, no efficient **strong** accumulator scheme has been developed yet. Most accumulator constructions rely on the RSA assumption wh...
Okay this is how I understood it according to [this][1]: - Alice $A$ establishes a connection to $KDC$ and prepares for session key Exchange $k_{ses}$ - $A$ encrypts the request with her key $k_A(A, B)$ meaning "*need a session key to communicate with Bob $B$*" - $KDC$ decrypts the message, genereates $k_A(k_{se...
I know we can hide information in the inter-packet delays, e.g. we can generate a code-book that each code-word corresponds to a message and is generated by realization of a specific random process. Is there a good, comprehensive resource about coding schemes like a “Poisson process”, or other processes? For exa...
First of all, sorry if the title is not *that* clear, I'll provide an in-depth explanation behind my question. So, basically I was reading about quantum cryptography and came across BB84. The protocol uses photon pulses composed of __polarized__ photons, which spin in a specified direction. That may be rectilinear s...
qkd - Does BB84 rely on a prearranged code?
> 5. Bob and Alice then take the correct configurations, and they convert those to a prearranged code, which could be, as an example, that a correctly guessed diagonal detector is 0, and a correctly guessed rectilinear detector is 1. This way an encryption key will be composed. I believe that's where you got it a bi...
[Cryptographic Obfuscation][1] is a technique that allows one to obfuscate source code in a secure way (as opposed to insecurely mangling it into spaghetti code.) For example, here is a way to protect a piece of data with a password: cipher_text = obfuscate("\key -> if input == SYMETRIC_KEY then return \"La...
What is the state of cryptographic obfuscation in 2015?
[Cryptographic Obfuscation][1] is a technique that allows one to obfuscate source code in a secure way (as opposed to insecurely mangling it into spaghetti code.) For example, here is a way to protect a piece of data with a password: cipher_text = obfuscate("\key -> if input == SYMETRIC_KEY then return \"La...
> 5. Bob and Alice then take the correct configurations, and they convert those to a prearranged code, which could be, as an example, that a correctly guessed diagonal detector is 0, and a correctly guessed rectilinear detector is 1. This way an encryption key will be composed. I believe that's where you got it a bi...
> The generated private key is same for both client and server is it true? No, that's not true. The key pairs and thus the private keys will be different. They will only be the same if the random number generator creates 521 identical bits for both the server and the client when the key pairs are generated. > Cl...
I would like to know what are the pairing parameters of PBC library and what are they used for? [Here][1] an example where they are used. I noticed that we can give any file in the param subdirectory. Is there any difference or change if we use one file unstead of another? thank you. [1]: https://crypto.st...
I am not sure if this is what you are looking for, however, the information theoretic capacity of a timing channel, where delays are manipulated, has been defined and analyzed in a number of papers, by using the Shannon formalism of maximizing the common information between the input and output to obtain/bound the capa...
What are the differences between curve NIST P-521 and Edwards E-521 for signature?
> What is its signature length ? Depends on what algorithms you use, but with ECDSA the signature length is twice the length of the order of the base point. For P-521 that's 1042 bits, or 132 bytes when using whole bytes for each part. For E-521 it's 1038 bits or 130 bytes. > How is it better ? The design crit...
I am using FIPS based OpenSSL module for encryption of sensitive data for my desktop socket server and client applications. I am using ECDH for key agreement.The keys public and private pair is generated for server and client on same curve NID_secp521r1. Now I want to exchange the public key between client and server a...
The Stanford [license for SRP][1] says: > Broader use of the SRP authentication technology, such as variants > incorporating the use of an explicit server secret (SRP-Z), may > require a license; Yet I cannot find a succinct description of the SRP-Z protocol and why it might be useful. As a follow up question ...
Where is SRP-Z from?
I'm basically a crypto noob (and not an english native), so please be indulgent :) I thought about if you could realize an eVoting system with bitcoin. I see 2 major requirements: 1. each citizen can only vote once 2. votes musn't be traceable I imagined the government could give each citizen a private ...
Could eVoting on the bitcoin blockchain be done?
Suppose somewhere is Fibonacci LFSR, we know that it has 7 cells and feedback taps are cell 2 and 7. We intercepted part of a stream, and part intercepted is 1010101. Is it possible to recover (preceeding)previous bits from this stream using this information?
Does anyone know where I might be able to find test vectors for the prf function in TLS? (either 1.0 or newer). I'm trying to implement a client and I am getting the BAD Record MAC return after sending my encrypted client finished message. I'm pretty sure everything seems to be working so I'm kinda scratching my head w...
Let $\quad E: y^2 = x^3 + ax + b \quad$ be an elliptic curve defined over a field $F_q$ where $q = p^n$, $a,b \in F_q$ and $p \neq 2, 3$. By Hasse's theorem we know that the order of $E(F_q)$ is in the range $[q+1-2\sqrt{q}, q+1+2\sqrt{q}]$. Is it possible to determine the order of $E(F_q)$ given $a, b, p$ without e...
How to determine the order of an ECG from the parameters of a curve?
Based off the various cipher suites available for TLS (which I am looking at here:https://www.thesprawl.org/research/tls-and-ssl-cipher-suites/), can anyone clarify if when the suite contains 'SHA', does it actually mean the orignal sha algorithm, or does it mean sha-1?
The answer to this question says that you should assume an attacker can do one billion operations per second: http://crypto.stackexchange.com/questions/27793/key-size-for-symmetric-homomorphic-encryption-over-the-integers1 Is that a single attacker with a simple desktop computer, or is that someone with a bot net or...
How much processing power should you assume an attacker has?
I'm not an expert in code obfuscation, but two things jump out at me in reading that article: 1. They don't seem to have a definition for what "securely obfuscate" means. What they do have is abstract and built on top of assumptions that probably won't hold in the real-world. [*] 2. Nowhere in that article is any...
I'm not an expert in code obfuscation, but two things jump out at me in reading that article: 1. They don't seem to have a definition for what "securely obfuscate" means. What they do have is abstract and built on top of assumptions that probably won't hold in the real-world. [*] 2. Nowhere in that article is any...
In the documentation of `ssh-keygen` (`man ssh-keygen`) it says for the option `-m` that an export to the format `“PKCS8” (PEM PKCS8 public key)` is possible. That works, and I can read the files using `openssl`. But the thiing that really confuss me: isn't `PKCS#8` a format for private keys? Or is `PKCS#8` of fo...
Why can ssh-keygen export a public key in PEM PKCS8 format?
I'm struggling to understand at what point a message is encrypted when looking at [RFC 5246][1]. The spec gives the generic block cipher in section 6.2.3.2 as: struct { opaque IV[SecurityParameters.record_iv_length]; block-ciphered struct { opaque content[TLSCompressed.length]; ...
Let $\quad E:\; y^2 = x^3 + ax + b \quad$ be an elliptic curve defined over a finite field $\mathbb F_q$ where $q = p^n$, $a,b \in \mathbb F_q$ and $p \neq 2, 3$. By Hasse's theorem we know that the order of $E(\mathbb F_q)$ is in the range $[q+1-2\sqrt{q}, q+1+2\sqrt{q}]$. Is it possible to determine the order of $...
How to determine the order of an elliptic curve group from its parameters?
Please consider we have finite field $\mathbb{F}_p$ for large number number $p$. We have a fixed filed element $\alpha$. By $r_i\leftarrow \mathbb{F}_p$ we mean we pick $r_i$ uniformly random from the field. We assume the values $r_i$ are distinct so $r_i\neq r_j$ ------------------------------------------ **Questi...
Suppose recursion for output of Galois LFSR is $u_1=u_3=u_4=0$ What kind of taps are here, and initial state? How to uncover this information?
> **Question:** Given $n$ values $v_1=\alpha \cdot r_1 \bmod p,..., v_n=\alpha \cdot r_n \bmod p$ for a large $n$ can the adversary learn the value $\alpha$? Answer: assuming that the $r_i$ values are random (that is, equidistributed and uncorrelated), then the attacker gets absolutely no information about $\alpha$ ...
Please consider we have finite field $\mathbb{F}_p$ for large prime number $p$. We have a fixed field element $\alpha$. By $r_i\leftarrow \mathbb{F}_p$ we mean we pick $r_i$ uniformly random from the field. We assume the values $r_i$ are distinct so $r_i\neq r_j$ ------------------------------------------ **Questio...
I'm struggling to understand at what point a message is encrypted when looking at [RFC 5246][1]. The spec gives the generic block cipher in section 6.2.3.2 as: struct { opaque IV[SecurityParameters.record_iv_length]; block-ciphered struct { opaque content[TLSCompressed.length]; ...
In the documentation of `ssh-keygen` (`man ssh-keygen`) it says for the option `-m` that an export to the format `“PKCS8” (PEM PKCS8 public key)` is possible. That works, and I can read the files using `openssl`. But the thiing that really confuss me: isn't `PKCS#8` a format for private keys? Or is `PKCS#8` of fo...
1. Where is the Digital Signature value in my certificate? I can find Signature Algorithm and Signature Hash algorithm. 2. Also why there are two fields specifying the Signature's Hash? With Signature Algorithm field, one can easily figure out Digital Certificate is signed with SHA-1/SHA2 hash. Please clarify m...
Where is Signaturevalue in Certificate?
I have a message I want to verify it's integrity and authenticity. I have a shared secret(key), that is **not** used for other encryption. Is it safe to send a plaintext message containing all the data I want to verify it's integrity and authenticity using CBC-MAC? I mean - of course the data is not secret, bu...
Given both Alice and Bob must exchange IP addresses to perform such an operation, what is the most secure way Alice and Bob can exchange public keys between two mobile devices without having to rely on a third-party server or hosted database of a website? And yes, while i understand the key is PUBLIC, my goal is to ...
I have a message and I want to verify its integrity and authenticity. I have a shared secret (key) that is **not** used for other encryption. Is it safe to send a plaintext message containing all the data I want, and to verify its integrity and authenticity using CBC-MAC? I mean - of course the data is not sec...
I am looking to implement the Fortuna algorithm on a system with very restrictive memory constraints, using AES-128 as the underlying cipher. As the key size is only 128 bits, using a 256-bit entropy pool hashing algorithm to maintain each pool would seem to be excessive (and a waste of memory). I would like to use...
"introduction to modern cryptography. 2ed" in page 254 "By obtaining sufficiently many estimates and letting $x_{i}$ be the majority value, $A{'}$can ensure that $x_{i}$ is equal to $gl(x, e^{i})$ with probability at least $1-\frac{1}{2n}$. Why is the probability $1-\frac{1}{2n}$?
Is this variant of SRP for peer-to-peer authentication practical?
I am trying to implement the internal primitives of ECDH. Currently I'm able to multiply the receiver's public EC point with the sender's private key to arrive at the shared EC point. Next step is to input the x-coordinate of the shared point which is a bignum to a hashing function. The curve is secp521r1 so the shared...
I'd say it depends of value of the assets. If you need to protect data worth let's say $10m, you can assume someone could throw at least money up to that value to get it. Converting money into computational power with AWS or Azure is pretty trivial today, and it can be done by virtually anyone. And of course state-l...
> What format must the x-coordinate bignum be converted to before hashing it? Any format works as long as it uniquely encodes the shared secret and is used by all parties. So if your code doesn't need to interact with other implementations, you can use whichever you like. If you need interoperability, you need to...
I am trying to implement the internal primitives of ECDH. Currently I'm able to multiply the receiver's public EC point with the sender's private key to arrive at the shared EC point. Next step is to input the x-coordinate of the shared point which is a bignum to a hashing function. The curve is secp521r1 so the shared...
How to derive a symmetric key from ECDH shared secret?
A single PC CPU core is running at roughly 3 GHz. Both hash functions and stream ciphers exist that operate at around 1 cycle per byte (with long messages). A brute force attack on a key requires computing at least one block, which we can call 128 bits, or 16 bytes. So about 200 million tries per second per core, or...
In the documentation of `ssh-keygen` (`man ssh-keygen`) it says for the option `-m` that an export to the format `“PKCS8” (PEM PKCS8 public key)` is possible. That works, and I can read the files using `openssl`. But the thing that really confuses me: isn't `PKCS#8` a format for private keys? Or is `PKCS#8` a for...
Why can ssh-keygen export a public key in PEM PKCS8 format?
I am trying to implement the internal primitives of ECDH. Currently I'm able to multiply the receiver's public EC point with the sender's private key to arrive at the shared EC point. Next step is to input the x-coordinate of the shared point which is a bignum to a hashing function. The curve is secp521r1 so the shared...
which procedure to verify Raw Public key (TLS ECDHE_EDCSA ciphersuite) ?
I'm confused with the concept of pairwise independent hash function and pseudorandom function, actually they seem same to me!!! A family of hash functions $H=\{ h:U \to [m] \}$ is $k$-independent if for any $k$ distinct keys $(x_1, \dots, x_k) \in U^k$ and any $k$ hash codes (not necessarily distinct) $(y_1, \dots, y_...
I'm confused with the concepts of pairwise independent hash function and pseudorandom function. They seem identical to me. A family of hash functions $H=\{ h:U \to [m] \}$ is $k$-independent if for any $k$ distinct keys $(x_1, \dots, x_k) \in U^k$ and any $k$ hash codes (not necessarily distinct) $(y_1, \dots, y_k) ...
A single PC CPU core is running at roughly 3 GHz. Both hash functions and stream ciphers exist that operate at around 1 cycle per byte (with long messages). A brute force attack on a key requires computing at least one block, which we can call 128 bits, or 16 bytes. So about 200 million tries per second per core, or...
I have read that the skein hash can be used for quite a few different functions, including a prng. Would using the 1024 skein hash to return 16KB of data be appropriate for a prng? Or would it only be appropriate to use the 128 bytes of data as a prng?
I have read that the skein hash can be used for quite a few different functions, including a PRNG. Would using the 1024 Skein hash to return 16KB of data be appropriate for a PRNG? Or would it only be appropriate to use the 128 bytes of data as a PRNG?
What procedure to use to verify a raw public key (TLS ECDHE_EDCSA ciphersuite)?
The [RFC5246][1] states the following: `The encrypted data length (TLSCiphertext.length) is one more than the sum of SecurityParameters.block_length, TLSCompressed.length, SecurityParameters.mac_length, and padding_length. Example: If the block length is 8 bytes, the content length (TLSCompressed.length) is 61 b...
The [RFC5246][1] states the following: > The encrypted data length (TLSCiphertext.length) is one more than the sum of SecurityParameters.block_length, TLSCompressed.length, SecurityParameters.mac_length, and padding_length. Example: If the block length is 8 bytes, the content length (TLSCompressed.length) is 61 ...
The [RFC5246][1] states the following: > The encrypted data length (TLSCiphertext.length) is one more than the sum of SecurityParameters.block_length, TLSCompressed.length, SecurityParameters.mac_length, and padding_length. Example: If the block length is 8 bytes, the content length (TLSCompressed.length) is 61 ...
> What is the extra byte and what should it be? That is due to the way padding is specified. The last byte is the padding length, from 0 to 255. That is the length of the padding without the length byte itself. So with "zero padding" there's still the padding length byte. > The first section says the length is th...
The [RFC5246][1] states the following: > The encrypted data length (TLSCiphertext.length) is one more than the sum of SecurityParameters.block_length, TLSCompressed.length, SecurityParameters.mac_length, and padding_length. Example: If the block length is 8 bytes, the content length (TLSCompressed.length) is 61 ...
I am reading some articles which explain on the fly signatures (also called online/offine signatures). The principle is that a few operations do not depend of the message we want to sign, so these values can be precomputed and use in the future to sign the message. Let's see an example with the Schnorr signature:...
I'm having a rough time understanding the math behind elliptic curves.<br> I want to implement **ECDH** where user can define **a, b,** and **p** parameters of elliptic curve.<br> <br> How can I calculate generator base point **G**? Is it any point that satisfies elliptic curve equation $ y^2 (mod p) = x^3 + ax + b ...
How to calculate elliptic curve parameters?
Can someone make sure I'm creating my Client finished message properly as I've been working at this for days and keep getting a Bad record MAC error and I have no idea what I'm doing wrong. 1.First step is creating the 12 bytes of verify data. This is created using the PRF with the master secret, the label "client f...
Does Curtmola et al.'s IND-CKA1/2 security definitions protect against search pattern leakage?
Do Curtmola et al.'s IND-CKA1/2 security definitions protect against search pattern leakage?
In the <a href="https://eprint.iacr.org/2006/210.pdf">article</a> *Searchable Symmetric Encryption: Improved Definitions and Efficient Constructions*, Curtmola et al. propose adaptive and non-adaptive (indistinguishability and simulator-based) security definitions for searchable encryption schemes, conventionally ca...
In the <a href="https://eprint.iacr.org/2006/210.pdf">article</a> *Searchable Symmetric Encryption: Improved Definitions and Efficient Constructions*, Curtmola et al. propose adaptive and non-adaptive (indistinguishability and simulator-based) security definitions for searchable encryption schemes, conventionally ca...