instruction stringlengths 15 30k |
|---|
As Thomas pointed out in his comment, in WPA-PSK the parties already have a shared secret (the pre-shared key), so there is no need to go through the step of Diffie-Hellman key-exchange -- *unless you want perfect forward secrecy (PFS)* (see update below).
In WPA, the client and the access point goes through a step... |
We are doing an iPhone app and read multiple forums which says SSL pinning makes it possible to avoid man in the middle as we trust our web services server through the certificate which will be pre bundled along with our app to appstore.
How can i protect the certificate ? We tried storing inside the app in base 64ed... |
SSL pinning - how to safely hide the certificate? |
How are memory hard functions designed for the purpose of password based key derivation? To protect against a brute force attack from a parallel machine.
What design could work well with skein? The skein paper has a time hard pbkdf (basically hashing the password repeat very many times) but not a memory hard one.
... |
memory hard password based key derivation functions? |
I'm encrypting an FPE algorithm in C#. What I did is convert the date I want to encrypt to the day of year value and a year value like so.
DateTime dtNew = new DateTime(parsedDateOffset.Year, parsedDateOffset.Month, parsedDateOffset.Day);
int dayOfYear = dtNew.DayOfYear;
int yyyy = parsedDateOffset.Ye... |
I'm encrypting an FPE algorithm in C#. What I did is convert the date I want to encrypt to the day of year value and a year value like so.
DateTime dtNew = new DateTime(parsedDateOffset.Year, parsedDateOffset.Month, parsedDateOffset.Day);
int dayOfYear = dtNew.DayOfYear;
int yyyy = parsedDateOffset.Ye... |
There are a number of *message authentication codes* (MACs) used in practice. They are highly used in practice (f.ex. in TLS), but there's (at least) one application where they can't be used: Full Disk Encryption (FDE).
Now most FDE applications just don't bother with authentication. TrueCrypt for example has no aut... |
Are deployed MACs IND-CPA? |
I'm encrypting an FPE algorithm in C#. What I did is convert the date I want to encrypt to the day of year value and a year value like so.
DateTime dtNew = new DateTime(parsedDateOffset.Year, parsedDateOffset.Month, parsedDateOffset.Day);
int dayOfYear = dtNew.DayOfYear;
int yyyy = parsedDateOffset.Ye... |
I'm encrypting an FPE algorithm in C#. What I did is convert the date I want to encrypt to the day of year value and a year value like so.
string input = "1901-01-01";
DateTimeOffset parsedDateOffset = new DateTimeOffset();
bool parsed = false;
parsed = DateTimeOffset.TryParseExact(input, "yyyy... |
Typically, in public-key settings, sign-then-encrypt has been used to provide confidentiality and integrity. However, most public-key cryptosystems use hybrid encryption. I've been searching around online for best practices for signing data, but I haven't found any. How should signatures work in a hybrid cryptosystem? ... |
Say we have a hash function that produces $n$ bit outputs. From the [birthday problem](https://en.wikipedia.org/wiki/Birthday_problem) that after around $\sqrt{2^n}$ different inputs to the has function, we can expect a collision.
Say instead that we have $m$ outputs. How many collisions can we expect in those $m$ o... |
Instead of generating the random key for the one time pad cipher over and over again, is there a mathematical formula that allows you to switch the key to a new key? The new key must be as random and secure as the original key. |
Mathematical formula for switching the key for OTP? |
I have 10 cipher texts ciphered with One Time Pad (OTP) using the same key.
I need to recover the key (or in other words, to recover the 11th cipher text which I assumed would require me to recover the key first).
I followed a technique called "Crib Drag" described in: http://crypto.stackexchange.com/questions/... |
Say we have a hash function that produces $n$ bit outputs. From the [birthday problem](https://en.wikipedia.org/wiki/Birthday_problem) that after around $\sqrt{2^n}$ different inputs to the has function, we can expect a collision.
Say instead that we have $m$ outputs. How many collisions can we expect in those $m$ o... |
I'm encrypting with an FPE algorithm in C#. What I did is convert the date I want to encrypt to the day of year value and a year value like so.
string input = "1901-01-01";
DateTimeOffset parsedDateOffset = new DateTimeOffset();
bool parsed = false;
parsed = DateTimeOffset.TryParseExact(input, ... |
The Bouncy Castle encryption library supports many modes where the maximum number of bits which can be produced by the hash are significantly fewer than the cipher strength. For example:
* MD5 (128 bit max) is paired with 256 Bit AES
* SHA1 (160 bit) max is paired with 256 Bit AES
What benefit is derive... |
Why would you use a Weaker Hash Function than Cipher Strength? |
Some cryptographic libraries (like “Bouncy Castle”) support many modes where the maximum number of bits which can be produced by the hash are significantly fewer than the cipher strength. For example:
* MD5 (128 bit max) is paired with 256 Bit AES
* SHA1 (160 bit) max is paired with 256 Bit AES
What ben... |
> Instead of generating the random key for the one time pad cipher over and over again, is there a mathematical formula that allows you to switch the key to a new key?
No.
Sure, there are more than a handfull of cryptographically secure pseudo-random number generators, stream ciphers, et al which could be used t... |
> Instead of generating the random key for the one time pad cipher over and over again, is there a mathematical formula that allows you to switch the key to a new key?
No.
<sub>(Please keep reading…)</sub>
A single mathematical formula won’t cut it. That’s where cryptographic algorithms come in. There are mor... |
> Instead of generating the random key for the one time pad cipher over and over again, is there a mathematical formula that allows you to switch the key to a new key?
No.
<sub>(Please keep reading…)</sub>
A single mathematical formula won’t cut it. That’s where cryptographic algorithms come in. There are mor... |
> Instead of generating the random key for the one time pad cipher over and over again, is there a mathematical formula that allows you to switch the key to a new key?
No.
<sub>(Please keep reading…)</sub>
A single mathematical formula won’t cut it. That’s where cryptographic algorithms come in. There are mor... |
Some cryptographic libraries (like “Bouncy Castle”) support many modes where the maximum number of bits which can be produced by the hash are significantly fewer than the cipher strength. For example:
* MD5 (128 bit max) is paired with 256 Bit AES
* SHA1 (160 bit) max is paired with 256 Bit AES
What benefit is ... |
Why would you use a weaker hash function than cipher strength? |
There are a number of *message authentication codes* (MACs) used in practice. They are highly used in practice (f.ex. in TLS), but there's (at least) one application where they can't be used: Full Disk Encryption (FDE).
Now most FDE applications just don't bother with authentication. TrueCrypt for example has no aut... |
If you take a convergent encryption algorithm and replace the hash $H$ used to derive the key with HMAC-H, keyed with a secret key $k'$, does the resulting algorithm provide you with deterministic authenticated encryption?
By deterministic authenticated encryption I mean the definition in [the SIV paper][1] by Rogaw... |
Can convergent encryption be turned into deterministic authenticated encryption with HMAC? |
TL;DR:
------
Is the Kurihara algorithm really what it purports to be (dramatically faster but equally secure replacement for Shamir Secret Sharing)?
https://scholar.google.com/scholar?q=kurihara+secret+sharing
Background
----------
Shamir's secret sharing algorithm has the desirable properties of informati... |
Any reason to use Shamir given faster XOR threshold secret sharing algos? |
The site below explains that part of doing homomorphic encryption, you need to generate a vector of random numbers that have the property that its dot product against a randomly generated bit vector has an absolute value less than some amount.
http://windowsontheory.org/2012/05/02/building-the-swiss-army-knife/
Is th... |
If you take a convergent encryption algorithm and replace the hash $H$ used to derive the key with HMAC-H, keyed with a secret key $k'$, does the resulting algorithm provide you with deterministic authenticated encryption?
By convergent encryption I mean content-hash keyed encryption, where the hash is encrypted wit... |
I've just read [this question][1] regarding why to sign only the hash of a message. I kind of understood the answer, but the question arisen is now:
**Why can I encrypt any text messages with the same method while it is needed to split up the message in order to sign it?**
I mean, signing is taking the private ke... |
How is message length involved in public/private-key encryption? |
I am looking at a RSA signature verification that is quite obviously flawed and am wondering if there's a way to exploit that flaw _in practice_.
Signature is generated using RSA with PKCS 1.5 padding, i.e. $S = M^d \mod N$, where $M$ is a padded message: $M = 00 \| 01 \| FFF ... F\|00\|m$ and $m$ is the raw message... |
After thinking about it here's what I think. Let me know what you think.
First, I generate a random vector of floats and figure out what the dot product is.
I then pick one of the elements of the float vector that correspond to a 1 in the binary array (randomly?), and then adjust that value the necessary amount to m... |
The site below explains that part of doing homomorphic encryption, you need to generate a vector of random numbers that have the property that its dot product against a randomly generated bit vector mod 2 has an absolute value less than some amount (but greater than zero).
http://windowsontheory.org/2012/05/02/buildin... |
> Is the Kurihara algorithm really what it purports to be (dramatically faster but equally secure replacement for Shamir Secret Sharing)?
The algorithm being referred to is [in this paper][1], and I believe that the speed benefits are at best marginal, if not nonexistent.
As for the speed benefits being marginal,... |
The paper "High-speed high-security signatures" by Bernstein et al. introduces the Edwards curve Ed25519.
Concerning the base point $B$, it says that
- $B$ is the unique point $(x, 4/5)\in E$ for which $x$ is positive, and
- $B$ corresponds to the basepoint used on the birationally equivalent curve Curve25519.... |
Base point in Ed25519? |
I'm new to cryptography and have a question regarding encryption usage.
The scenario is as follows:
I have an endpoint hardware device (CPU - ARM A7 1.2 ghz) which runs Ubuntu 14.04.
This hardware device needs to communicate with a server (CPU - Xeon family) which also runs Ubuntu 14.04.
What is the most secu... |
You don't need to hide the certificate at all. The certificate only contains the public key and additional info of the user. It shouldn't contain any private information. What you need to do is to store the certificate in such a way that you can trust the origin of the certificate.
So what you need to think about is... |
You don't need to hide the certificate at all. The certificate only contains the public key and additional info of the owner (in this case the server). It shouldn't contain any private information. What you need to do is to store the certificate in such a way that you can trust the origin of the certificate.
So what... |
I've been told that prime-number factoring is based on a "russian-doll" sequence of matrices, where a seed matrix of height Y and width X exists consisting of all zeros except for a single 1 at row Y column X. For every x columns added, the matrix grows by y, and two closely related formulas sum the column vectors and... |
Has anyone heard of matrix-based "Russian Doll" encryption techniques? |
If classical ciphers are used with compressed plaintext, how much does it make frequency analysis attack harder? |
Classical ciphers are weak and no longer be used. They can be easily broken by using frequency analysis, that is a well-known fact.
But, the frequency analysis often depends on the number of captured ciphertext, and/or the duplication of the text. What if the text was compressed by some types of algorithms (such as ... |
Classical ciphers, such as Vigenère cipher, are weak and no longer be used. They can be broken by using frequency analysis, that is a well-known fact.
But, the frequency analysis often depends on the number of captured ciphertext, and/or the duplication of the text. What if the text was compressed by some types of a... |
> Is the Kurihara algorithm really what it purports to be (dramatically faster but equally secure replacement for Shamir Secret Sharing)?
The algorithm being referred to is [in this paper][1], and I believe that the speed benefits are at best marginal, if not nonexistent.
As for the speed benefits being marginal,... |
I am trying to understand how a cryptographic library works (for example, one that provides assymetric encryption such as RSA), but I'm running into a few problems about the key-generation. There are a lot of questions regarding the generation of random primes, but I'm interested in the generation of a random number. T... |
I am trying to understand how a cryptographic library works (for example, one that provides assymetric encryption such as RSA), but I'm running into a few problems about the key-generation. There are a lot of questions regarding the generation of random primes, but I'm interested in the generation of a random number. T... |
I am looking into the securety of diffie-hellman and the discrete log in general.
To make sure an atacker can not use pohlig-hellman to solve the discrete log quickly we need to make sure that the order of the group, $n$, has a large prime factor.
For diffie hellman in $F_p$ this would mean that we should factorize ... |
> Is this not just as hard as the RSA problem?
Oddly enough, no. If we were given a random $p$, and were asked to see if there's a large prime factor $q$ of $p-1$, yes, that would be, on average, a hard problem. However, that's not what we actually do.
Instead, we get to pick $p$, and so that gives us a lot of ... |
I am trying to understand how a cryptographic library works (for example, one that provides assymetric encryption such as RSA), but I'm running into a few problems about the key-generation. There are a lot of questions regarding the generation of random primes, but I'm interested in the generation of a random number. T... |
I am looking into the security of Diffie-Hellman and the discrete log in general.
To make sure an attacker can not use Pohlig-Hellman to solve the discrete log quickly we need to make sure that the order of the group, $n$, has a large prime factor.
For Diffie-Hellman in $F_p$ this would mean that we should facto... |
I need to generate some session keys from a master key that was generated from an ECDH key exchange. The master key is 256 bits and I need 256 bit sessions keys.
Is it safe to use SHA256_HMAC with a counter as the HMAC input to get the session keys?
skey1 = SHA256_HMAC(master_key, 1);
skey2 = SHA256_HMAC(m... |
Edward curves were considered initially because they provide a unified formula for both doubling and addition, thus having inherent side-channel resistance. But a lot of work has been done recently involving construction of a different class of addition and doubling formula (e.g. differential addition formula, w-coordi... |
Why develop Edward curve formulas that deviate from unification? |
I've been working through how TLS1.0 works, and think I've basically understood most of it. One thing I can't seem to find a explanation of though is the order in which MACing and encrypting should happen. Let's say we've got the client finished message. You generate the 12 bytes of verify_data from the master secret, ... |
What are the problems of IKEv1 aggressive mode (compared to IKEv1 main mode or IKEv2)? |
How do we generate AES S-BOX? |
I'm currently looking at an encrypted 'Client Finished' message in Wireshark from a TLS session. The cipher suite that was agreed on in previous messages was TLS_RSA_WITH_AES_256_CBC_SHA. By my understanding, the encrypted message should have a Handshake Protocol header which is made up of the handshake type and the le... |
Give this mutual-authentication protocol (along with the attack) in which Alice wants to communicate with Bob, i can't understand how the attack works.
1) A chooses **N** (nonce) and sends to C (trusted server): **A**, **B**, **N**
2) C chooses **K** and sends to A: **Kac(N, K, B, Kbc(K,A))**
2') Now Trud... |
I'm currently looking at an encrypted `Client Finished` message in Wireshark from a TLS session. The cipher suite that was agreed on in previous messages was `TLS_RSA_WITH_AES_256_CBC_SHA`.
By my understanding, the encrypted message should have a Handshake Protocol header which is made up of the handshake type and t... |
> [Isn't this] just as hard as the RSA problem?
Oddly enough, no. If we were given a random $p$, and were asked to see if there's a large prime factor $q$ of $p-1$, yes, that would be, on average, a hard problem. However, that's not what we actually do.
Instead, we get to pick $p$, and so that gives us a lot of... |
Give this mutual-authentication protocol (along with the attack) in which Alice wants to communicate with Bob, I can't understand how the attack works.
1. A chooses $N$ (nonce) and sends to C (trusted server): $A, B, N$
2. C chooses $K$ and sends to A: $Kac(N, K, B, Kbc(K,A))$
3. Now Trudy acts in place of Ali... |
I'm currently dealing with multiple blowfish-encrypted files that share the same key. All are encrypted using ECB mode judging from their appearance:
[![…][1]][1]
I don't know what the key is but I know 64 byte (or 6 blocks) of consecutive plaintext. The key length used is most certainly 448 bit.
Now, I just r... |
I am a beginner in cryptography. I'm testing aes-128 bit key, aes-256 bit key, and camellia-256 bit key.
- in using aes-256, 9 character salt, CBC mode, PKCS5 padding, and the ciphertext using BASE64encoder
0-15 character plaintext produce 24 character ciphertext.
16-31 character plaintext produce 44 charac... |
how to calculate avalanche effect in aes-256? |
I am a beginner in cryptography. I'm testing aes-128 bit key, aes-256 bit key, and camellia-256 bit key.
- in using aes-256, 9 character salt, CBC mode, PKCS5 padding, and the ciphertext using BASE64encoder
Avalanche effect is to calculate bitschanged/totalbits.
If i want to calculate the avalanche effect... |
I am a beginner in cryptography. I'm testing AES-128 bit key, AES-256 bit key, and Camellia-256 bit key.
- I'm using AES-256, 9 character salt, CBC mode, PKCS #5 padding, and the ciphertext using BASE64encoder.
Avalanche effect is to calculate bitschanged/totalbits.
If I want to calculate the avalanche effect... |
How to calculate the avalanche effect in aes-256? |
I am trying to understand how a cryptographic library works (for example, one that provides assymetric encryption such as RSA), but I'm running into a few problems about the key-generation. There are a lot of questions regarding the generation of random primes, but I'm interested in the generation of a random number. T... |
Modular Multiplicative Inverse and RSA? |
I am a beginner in cryptography. I'm testing AES-128 bit key, AES-256 bit key, and Camellia-256 bit key.
- I'm using AES-256, 9 character salt, CBC mode, PKCS #5 padding, and the ciphertext using BASE64encoder.
Avalanche effect is to calculate *”changed bits / total bits”*. If I want to calculate the avalanche... |
I'm using a function `randInt` that takes as input two integers as upper and lower bounds (inclusive) and outputs a pseudorandom number in that interval. Unfortunately, the function's range can be an interval no greater than 10<sup>14</sup> - 2 (meaning the difference of the inputs can be no more than that value). As ... |
How to generate a large random number from smaller ones? |
I'm using a function `randInt` that takes as input two integers as upper and lower bounds (inclusive) and outputs a pseudorandom number in that interval. Unfortunately, the function's range can be an interval no greater than $10^{14} - 2$ (meaning the difference of the inputs can be no more than that value). As a worka... |
How can I calculate the probability of collisions of a hashing algorithm? |
I see no issue here about bit diffusion; if $\textit{MIX-i}$ has a problem, so does $\textit{MIX}$.
The reason is simple, $\textit{MIX-i}$ is precisely $\textit{MIX}$, but backwards. Hence, if $\textit{MIX}$ starting at initial state $S_0$ and ending at final state $S_n$, would generate the output:
$B_0, B_1, ... |
I've found a way to complete a task which I'd solve with passwords or by sending keys over the wire (otherwise) by using RSA's homomorphic property.
I'm restricted to RSA (any padding) and ECDH (for hardware reasons) to implement "blindable decryption", where one party holds some encrypted data, blinds it, sends it ... |
IND-CCA1 RSA padding? |
I'm using a function `randInt` that takes as input two integers as upper and lower bounds (inclusive) and outputs a pseudorandom number in that interval. Unfortunately, the function's range can be an interval no greater than $10^{14} - 2$ (meaning the difference of the inputs can be no more than that value). As a worka... |
I've found a way to complete a task which I'd solve with passwords or by sending keys over the wire (otherwise) by using RSA's homomorphic property.
I'm restricted to RSA (any padding) and ECDH (for hardware reasons) to implement "blindable decryption", where one party holds some encrypted data, blinds it, sends it ... |
If you take a convergent encryption algorithm and replace the hash $H$ used to derive the key with HMAC-H, keyed with a secret key $k'$, does the resulting algorithm provide you with deterministic authenticated encryption?
By convergent encryption I mean content-hash keyed encryption, where the hash is encrypted wit... |
I am writing a paper on the implementation of QKD in the future. I want to know if there are any viable attacks on the BB84 protocol or QKD in general? I know of the Photon Number Splitting attack or spectroscopy in the case of diode manufacturing but I have heard that there are already solutions for those. Are there a... |
What are the current known weaknesses/attacks on quantum key distribution? |
Where can I find NTRU test vectors?
In some research work in 2001, it is stated that test vectors were not publicly available at the time. Then in this ESSS1v2 standard under IEEE1363 [here][1] , the appendix B mentions that the test vectors will be added in future versions. I haven't found any. Where could I get the ... |
The typical version of the *one-time-pad* (OTP) uses XOR to combine a key pad and a message. ($c=m\oplus k$)
Now let's assume some other scenarios which have the practical application of blinding. Do the below "OTP" constructions provide perfect secrecy?
1. The key $r\in (0;n)$ is chosen uniformly at random such... |
Can one construct OTPs without using XOR? |
I have an application which consists of a client and a server. Both have a pair of public and private key (RSA). For communication, both sign their messages and send them to the other part. So a message Looks like this:
_____________________
| HTTP Post request |
|___________________|
| Post d... |
I’m a bit confused about what the simulator of the special-honest verifier zero-knowledge property of a $\Sigma$-protocol is supposed/allowed to do and how to prove that it is indeed efficient (i.e. it runs in a time polynomial in the security parameter).
A 3-move protocol between a prover $P$ and a verifier $V$ is ... |
How does the simulator of the special-honest verifier zero-knowledge property works? |
some years ago it took long time to "decrypt" hashes because they took slow cpu to brute force. Nowadays they use graphic cards for stuff like this and can do this most time in less than 20 Minutes without problems.
So: Even if they don't take that long to decrypt hashes, would it still be worth time in developing, ... |
Is hashing data with dynamic keys still worth effort? |
Your question is about breaking *password hashing scheme*s (PHSs).
The usual way to break password hashes is by brute-forcing the input until you find a match between the resulting hash and the obtained hash.
Now there're some counter-measures to harden the schemes against various attacks that would allow you to ... |
As far as I understood, a secret key (same length as CBC block size) and an initialization vector (IV) are needed to decrypt a AES-256-CBC encrypted string. As the IV should better be random, it has be distributed in plaintext along with the encrypted text.
Is there a standard or at least "commonly used" format to f... |
Where can I find NTRU test vectors?
In some research work in 2001, it is stated that test vectors were not publicly available at the time. Then in this ESSS1v2 standard under IEEE1363 [here][1] , the appendix B mentions that the test vectors will be added in future versions. I haven't found any. Where could I get th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.