instruction stringlengths 15 30k |
|---|
Is a changing public truecrypt container secure? |
I'm investigating this function:
a = (b*c) % k - (b*c)\k
where "\" indicates integer division and % indicates mod (aka remainder).
Two things I've noticed: * It's equivalent to multiplying a*b, and then subtracting the high digits from the low digits (in a radix which divides k) * It's completely linear, and c... |
Please forgive the impracticality of this question, but I'm curious about the behaviors of encryption algorithms applied to their own output.
Suppose I have an encryption algorithm E and (using the same key(s)) I repeatedly encrypt its output for a given plaintext: `E(E(E(E(...E(plaintext)`
Would a modern encrypt... |
Eventually, it will cycle, but it'll almost certainly take far longer than your lifetime to do so.
If that sounds too flip, here's the mathematics. Assuming AES is secure, then the probability it will cycle after *r* repeated encryptions is just *r*/2<SUP>128</SUP>. (This follows from [a standard fact about the cy... |
I'm investigating this function:
$a \equiv (b*c) \mod{(k - (b*c)/k)}$
where $/$ indicates integer division.
Two things I've noticed:
1. It's equivalent to multiplying a*b, and then subtracting the high digits from the low digits (in a radix which divides k)
2. It's completely linear and can be inverted... |
I'm investigating this function:
$a \equiv ((b*c) \mod{k}) - (b*c)/k$
where $/$ indicates integer division.
Two things I've noticed:
1. It's equivalent to multiplying a*b, and then subtracting the high digits from the low digits (in a radix which divides k)
2. It's completely linear and can be inverted... |
I'm investigating this function:
$a := ((b\cdot c) \bmod k) - (b \cdot c)/k$
where $/$ indicates integer division.
Two things I've noticed:
1. It's equivalent to multiplying a·b, and then subtracting the high digits from the low digits (in a radix which divides k)
2. It's completely linear and can be i... |
Say I want a random 1024-bit prime $p$. The obviously-correct way to do this is select a random 1024-bit number and test its primality with the usual well-known tests.
But suppose instead that I do this:
1. select random odd 1024-bit number $n$
2. if $n$ is prime, return $n$
3. $n \leftarrow n+2$
4. goto ... |
I am attempting to duplicate wireshark's packet capture decryption for a TLS HTTP session, where I control the private key of the server.
The cipher suite number is 0x00002f, TLS_RSA_AES_128_CBC_SHA
I wrote a utility that takes apart the packet captures using libpcap, and so far can match what the logs from wires... |
What causes first block of AES decryption to be garbled, even with correct IV? |
Eventually, it will cycle, but it'll almost certainly take far longer than your lifetime to do so.
If that sounds too flip, here's the mathematics. Assuming AES is secure, then the probability it will revisit the original plaintext after *r* repeated encryptions is just *r*/2<SUP>128</SUP>. (This follows from [a s... |
I'm working on a cryptosystem which uses IDEA. The designer made the mistake of including a CRC-32B hash of the password unencrypted in the header, so that the system can quickly reject bad passwords. Of course, that opens it up to the obvious attack of brute forcing CRC32 over potential passwords until the right one... |
Eventually, it will cycle, but it'll almost certainly take far longer than your lifetime to do so.
If that sounds too flip, here's the mathematics. Assuming AES is secure, then the probability it will revisit the original plaintext after at most *r* repeated encryptions is just *r*/2<SUP>128</SUP>. (This follows f... |
There are zillions of articles describing CRC. What can I ready to understand more deeply what's really going on? Both from an algebraic perspective and a bit-manipulation perspective, I'd like to understand it well enough to have an intuitive feel for it.
(Also see http://crypto.stackexchange.com/questions/696/bru... |
When bruteforcing a password (eg the common attacks on DES), where you have ciphertext only you need a way to assess whether it's the right one. I believe the EFF DES machine does this by checking if the chars are printable. Of course, this only works for ASCII files, not things like images.
I'd like to measure th... |
Most CS/Math undergrads run into the well-known RSA cryptosystem at some point. But about 10 years ago Boneh and Franklin introduced a practical Identity-Based Encryption system (IBE) that has excited much of the research community and produced a huge flood of follow-up work.
What is IBE exactly and in what way doe... |
What is Identity-Based Encryption (IBE) and why is it "better"? |
Well, the quick answer to what is IBE is "it's public key encryption except that someone's public key can be an arbitrary string, rather than something picked by a key generation process".
The first obvious question to above would be "if John Smith can get the private key corresponding to "JohnSmith@company.com", wh... |
For TLS the IV for the first packet is generated from the shared secrets; quoting the RFC 2246
================
To generate the key material, compute
key_block = PRF(SecurityParameters.master_secret,
"key expansion",
SecurityParameters.server_random ... |
For TLS the IV for the first packet is generated from the shared secrets; quoting the [RFC 2246][1]:
> To generate the key material, compute
>
> key_block = PRF(SecurityParameters.master_secret,
> "key expansion",
> SecurityParameters.server_random +
> ... |
Underlying the Schnorr signature is an identification protocol: let $G$ be a cyclic group where discrete log is "hard" and choose $g$ as a generator of $G$. Now have Alice pick a random (secret) exponent $s$ and publish $v=g^s$.
To identify herself to Bob, it goes like this:
1. Alice chooses a random exponent ... |
The well-known Counter-Mode (CTR) mode of operation for a block cipher essentially converts any block cipher into a stream cipher. Is there a way to do the reverse? In other words, given a "good" stream cipher $G$, can we construct a block cipher that builds its strength based on $G$? |
Is it feasible to build a stream cipher from a cryptographic hash function? |
When bruteforcing a password (eg the common attacks on DES), where you have ciphertext only you need a way to assess whether it's the right one. I believe the EFF DES machine does this by checking if the chars are printable. Of course, this only works for ASCII files, not things like images.
I'd like to measure th... |
No, there is not a good way to build a block cipher out of a stream cipher. There are constructions, but they are very slow and not very practical.
Why do you ask? It's not clear to me why you'd want to build a block cipher out of a stream cipher. Perhaps if you tell us what you are actually trying to accomplish,... |
In the other answers, you'll find how to simulate a proof if you know $e$. This answer is meant to provide some **"color commentary"** on the other answers. It is a companion piece.
**Notation**
- In step 1, Alice sends $g^r$. Call this value $a=g^r$.
- In step 3, Alice sends $r+se$. Call this value $b=r+se$.... |
In the other answers, you'll find how to simulate a proof if you know $e$. This answer is meant to provide some **"color commentary"** on the other answers. It is a companion piece.
**Notation**
- In step 1, Alice sends $g^r$. Call this value $a=g^r$.
- In step 3, Alice sends $r+se$. Call this value $b=r+se$.... |
In the other answers, you'll find how to simulate a proof if you know $e$. This answer is meant to provide some **"color commentary"** on the other answers. It is a companion piece.
**Notation**
- In step 1, Alice sends $g^r$. Call this value $a=g^r$.
- In step 3, Alice sends $r+se$. Call this value $b=r+se$.... |
Working on a cipher (which I assume to be a mono-alphabetic substitution cipher due to the letter frequency) I struggle with the fact that I don’t know which language it is written in. Looking at the letter frequency only, gives some hints, at least to exclude some languages, but far from pointing out one. I have also ... |
What is the best method to determine the language used in a cipher? |
Working on a cipher (which I assume to be a mono-alphabetic substitution cipher due to the letter frequency) I struggle with the fact that I don't know which language the plain text is written in. Looking at the letter frequency only, gives some hints, at least to exclude some languages, but far from pointing out one. ... |
What is the best method to determine the language used in a monoalphabetic substitution cipher? |
I can't tell you which method is the best, but I can point out some places to look. The longer the message the easier it is easier to identify. How long is the message?
**n-gram frequency:** Look at the likelihood that groups of n-letters appear next to each other (often called [n-grams][1]). For example is does the... |
I understand the pseudo-random number generators use. I am not getting mixed up between the two. However I don't understand what a real random number generator is used for. If it is not deterministic, how can it be used in an algorithm? |
What is the use of REAL random number generators in cryptography? |
Is Convergent Encryption really secure? |
Why use an [Initialization Vector (IV)][1]?
* How are IV's used?
* What are the advantages/disadvantages of using an IV?
* Why use an IV instead of a longer key in which some section of the key is pubic?
* What happens to various security properties if an IV is [insufficiently][2] [random][3]?
* Are IV's always ... |
Why use an Initialization Vector (IV)? |
I have a program where computing SHA-1 is the bottleneck. This is using OpenSSL 1.0.0e on a 2.6Ghz 16-core Opteron where I get about 325MiB/s throughput. (SHA1 here is via Andy Polyakov's x86-64 assembly implementation using SSSE3.) If I need to go faster, what makes most sense?
- Use multiple cores
- Use anot... |
Well, the exact reason for an IV varies a bit between different modes that use IV. At a high level, what the IV does is act as a randomizer, so that each encrypted message appears to be encrypted to a random pattern, even if those messages are similar. In general, IVs disguise when you encrypt the same message twice... |
Inspired by "[Guarding against cryptanalytic breakthroughs: combining multiple hash functions](http://crypto.stackexchange.com/q/270/429)", I am curious if there is a cryptographic reason to use only one algorithm during encryption.
For example, start with Blowfish, move to AES, switch to DES, etc, in a defined, but... |
Consider the following (probably naive) scenario.
Alice, who is very limited in her knowledge of security in general (clueless about securing a private key for example), wishes to delegate certain contractual operations to Trent, an apparent trusted expert in that field.
However, Alice is rightly cautious and i... |
How should one implement a delegated shared trust protocol? |
I have a ciphertext that I do not know what the encryption method is, and I only have the beginning of the plaintext. What are some good tools, or how do you suggest trying to recover the plaintext? |
I have a ciphertext that I do not know what the encryption method is, and I only have the beginning of the plaintext. What are some good tools, or how do you suggest trying to recover the plaintext?
In my example, I have this ciphertext:
> NUVRRIEZWBRVRFFAPUUKFVRYNQBCINHZKNETUVDVUMRTEANPAFIELBPOANIXLCMEZQETKDKVWB... |
I have a ciphertext that I do not know what the encryption method is, and I only have the beginning of the plaintext. What are some good tools, or how do you suggest trying to recover the plaintext?
In my example, I have this ciphertext:
> NUVRRIEZWBRVRFFAPUUKFVRYNQBCINHZKNETUVDVUMRTEANPAFIELBPOANIXLCMEZQETKDKVWB... |
It seems that Eve can do two malicious things in designing her ciphers (if I'm leaving something out please let me know):
Reformulation of the question: Alice is given $n$ ciphers ( $cipher_0,cipher_1,...cipher_n$) to build a key expander, one of these ciphers is a secure cipher (random permutation) and the rest ($n... |
Reformulation of the question: Alice is given $n$ ciphers ( $cipher_0,cipher_1,...cipher_n$) to build a key expander, one of these ciphers is a secure cipher (random permutation) and the rest ($n-1$ of them) can be maliciously controlled by Eve. Alice are unable to inspect these ciphers or their input/outputs to determ... |
I have the following question:
Suppose that a single evaluation of a block-cipher (DES or AES) takes 10 FLOPs.And the computer can do $10^{15}$ floating points operation per second. How long would it take for to recover a DES key, using a brute-force search?How about a 128-bit AES key?
|
Is the following statement true?
If $G: \{0,1\}^k \rightarrow \{0,1\}^n$ is a PRG, then so is $G^' \{0,1\}^{k+l} \rightarrow \{0,1\}^{n+l}$ defined as $$G'(x.x')=G(x).x'$$ where $x \in \{0,1\}^k$ and $x' \in \{0,1\}^l$. Here . means concatenation. My thought is that since x' is not processed through the pseudo numbe... |
Is the following statement about PRG true or false? |
Is there any way to effectively generate valid public key in schemes like ElGamal or Benaloh for a number of participants? There's no need in private keys since there's no intent to decrypt messages, only to encrypt them securely. |
Is there any way to effectively generate valid public key in schemes like ElGamal or Benaloh for a number of participants? There's no need in private keys since there's no intent to decrypt messages at all, only to encrypt them securely. |
Is the following statement true?
If $G: \{0,1\}^k \rightarrow \{0,1\}^n$ is a PRG, then so is $G^' \{0,1\}^{k+l} \rightarrow \{0,1\}^{n+l}$ defined as $$G'(x.x')=G(x).x'$$ where $x \in \{0,1\}^k$ and $x' \in \{0,1\}^l$. We are using . to denote concatenation. My thought is that since x' is not processed through the ... |
Suppose that a single evaluation of a block-cipher (DES or AES) takes 10 operations, and the computer can do $10^{15}$ such operations per second.
How long would it take for to recover a DES key, using a brute-force search? How about a 128-bit AES key?
|
How long does it take to crack DES and AES? |
A few definitions could assist: are $x$ and $x'$ *random* elements of $\{0,1\}^k$ and $\{0,1\}^l$?
Is $\mathsf{G}$ a *cryptographically-secure* PRG or a PRG with some statistical properties?
Let $\mathcal{D}$ be a PPT-distinguisher and $r$ be a uniformly random bitstring of length $n + \ell$. A common definition ... |
1st, you know that AES, etc, are for encryption, right? Don't consider using "encrypt the password" because if someone gets your key, it can discover all your secrets.
2nd, *the* problem with hashes is the speed. That's why the best approach is to use slower hashing algorithms. While it'll make your login take longe... |
I'm new to this arena, but had a thought today that I was hoping to get clarification on.
For security's sake, of course it's blasphemous to store passwords in plain-text; using a hash function and then doing a re-hash and comparison is considered much better.
But, if bad guys steal your database, they still coul... |
Webapp password storage: Salting a hash vs multiple hashes? |
For security's sake, of course it's blasphemous to store passwords in plain-text; using a hash function and then doing a re-hash and comparison is considered much better.
But, if bad guys steal your database, they still could brute-force against the hash and conceivably retrieve many passwords.
The question I hav... |
I am looking for a hash function that is computable by hand (in reasonable time). The function should be at least a little bit secure: There should be no trivial way to find a collision (by hand). For instance, a simple cross-sum is not meeting this criteria since one can easily construct a number with the same hash th... |
Is there a simple hash function that one can compute without a computer? |
How to fairly produce a random number between game players wihout trusted third parties? |
How to fairly select a random number for a game without trusting a third party? |
You can look at the time taken by the 3 DES Challenges :
DES Challenge I - 140 days
DES Challenge II - 41 days
DES Challenge III - **56 hours**
http://cs-exhibitions.uni-klu.ac.at/index.php?id=263 |
Several people are playing a game with random events and require a way to produce a random number. (Such as dice rolls or a lottery.)
Can this be done such that each player has the power to be reasonably sure that the random number was fairly selected, without having to trust *anyone* else?
This question stems fr... |
In the [original paper introducing RSA][1] it is implied that one should first choose d and then calulate e from p, q, and d. However, I have found in other places (such as the [wikipedia article on RSA][2]) that one should first calculate e, and only then calclulate d from it.
Which of these two methods are preferr... |
In RSA do I calculate d from e or e from d? |
Over on the [bitcoin forums][1] I asked why the bitcoin client computes SHA-256(SHA-256(x)) as its cryptographic hash for a variety of purposes. The leading theory--since the bitcoin author has disappeared--seems to be that from a security standpoint it could be sort-of analogous to upping the number of rounds in SHA-2... |
Hashing or encrypting twice to increase security? |
Considering a cryptographic hash, such as MD5 or SHA2, denoted by the function H(m) where m is an arbitrary binary string, there is a lot of material available that deals with potential weakness to preimage attack. I am interested in resistance to preimage attack where the cryptographic hash is applied recursively a nu... |
Considering a cryptographic hash, such as MD5 or SHA2, denoted by the function $H(m)$ where $m$ is an arbitrary binary string, there is a lot of material available that deals with potential weakness to preimage attack. I am interested in resistance to preimage attack where the cryptographic hash is applied recursively ... |
Considering a cryptographic hash, such as MD5 or SHA2, denoted by the function $H(m)$ where $m$ is an arbitrary binary string, there is a lot of material available that deals with potential weakness to preimage attack. I am interested in resistance to preimage attack where the cryptographic hash is applied recursively ... |
Assume there is a public-key encryption scheme $(KeyGen, Enc, Dec)$ with perfect correctness (i.e., for all messages M and valid key-pairs (PK,SK), we have $Dec_{SK}(Enc_{PK}(M))=M$).
Will there always be a function $A$ such that for all messages M and valid public-keys PK, $A_{PK}(Enc_{PK}(M))=M$?
In other wor... |
Can a computationally unbounded adversary break any public-key encryption scheme? |
Is the last step of an iterated cryptographic hash still as resistant to preimage attacks as the original hash? |
Yes, a computationally unbounded attacker can break any public key system.
One easy way to see this is to consider the KeyGen algorithm, which takes takes as input a value R (which in normal use is the output of some random number generator), and outputs a public key PK and a private key SK.
Now, what a computati... |
Are there any available test cases for testing elliptic curves like secp256k1 (Korblitz curves from http://www.secg.org/collateral/sec2_final.pdf)? For curves like P192 there are for example those values: http://point-at-infinity.org/ecc/nisttv .
Moreover, what other ways one should test an implementation of an elli... |
I am working with golang's elliptic library:
http://golang.org/src/pkg/crypto/elliptic/elliptic.go
It implements functions on Weierstrass elliptic curves with a=-3. I need to make my own library that allows me to handle curves with a=0. I understand there are specific equations to use to optimally perform operations ... |
Consider the following (probably naive) scenario.
Alice, who is very limited in her knowledge of security in general (clueless about securing a private key for example), wishes to delegate certain contractual operations to Trent, an apparent trusted expert in that field.
However, Alice is rightly cautious and i... |
Consider the following (probably naive) scenario.
Alice, who is very limited in her knowledge of security in general (clueless about securing a private key for example), wishes to delegate certain contractual operations to Trent, an apparent trusted expert in that field.
However, Alice is rightly cautious and i... |
I am familiar with concepts such as the following:
- PKI and CAs
- ID based cryptography
- Certificateless cryptography
- PGP web of trust
- more or less anything in basic Crypto that is taught in a college course
I need to quickly understand the main ideas behind "SPKI" or (Simple public key infrastructure)... |
*Short version:* SPKI links not only names, but authorizations to keys. Also, it uses a better syntax (S-expressions) than X.509 certificates.
-------------
*Long version:*
### What problem does it solve?
Both the traditional CA-based public-key infrastructure (PKI) and PGP's web of trust (and other similar... |
So suppose in order to avoid lose in transmission, a private key scheme $(Gen, Enc, Dec)$ is modified to be $(Gen, Enc^', Dec^')$, such that the message m is encrypted independently three times as $Enc^'(m)=(c_1,c_2,c_3)$ each $c_i=Enc(m)$. When for decryption, the 3 ciphertexts are decrypted. If at least 2 recover to ... |
Is there any way to effectively generate valid **distributed** public key in schemes like ElGamal or Benaloh for a number of participants? There's no need in private keys since there's no intent to decrypt messages at all, only to encrypt them securely.
As far as I know, there's no effective way to generate distribu... |
Is there any way to effectively generate valid **distributed** public key in schemes like ElGamal or Benaloh for a number of participants? There's no need in private keys since there's no intent to decrypt messages at all, only to encrypt them securely.
As far as I know, there's no effective way to generate distribu... |
I have a simple problem: I have a set of users' ECDSA key pairs, and say I want to encrypt them with a simple algorithm. I have access to one variable that uniquely identifies the user, so I hash it with a SHA-2 algorithm and have a string of bytes longer than each of the keys.
Is it safe to XOR a key pair, or XORi... |
Is Hiffie Hellman key exchange the same as RSA? - Diffie Hellman allows
key exchange on a observed wire - but so can RSA.
Alice and Bob want to exchange a key - Big brother is watching everything.
1) Bob makes an fresh RSA key pair and sends his public key to Alice.
2) Alice makes a random session key and send... |
Is the Diffie-Hellman key exchange the same as RSA?
Diffie Hellman allows key exchange on a observed wire – but so can RSA.
Alice and Bob want to exchange a key – Big brother is watching everything.
1. Bob makes an fresh RSA key pair and sends his public key to Alice.
2. Alice makes a random session key and s... |
Is Diffie-Hellman mathematically the same as RSA? |
I`m currently implementing an ECDSA library based on curves like secp256k1. I would like to test it using some test vectors, like http://csrc.nist.gov/groups/STM/cavp/documents/dss/ecdsatestvectors.zip . Is there any place where I can get some vectors for testing encryption with that curve?
Example vector has this s... |
I am using RSA to encrypt some data but I would like to eliminate the possibility of message replay. By message replay I mean sending a valid message multiple times to the original recipient. It is obvious that an attacker can capture a valid message without knowing its contents and replaying it.
**Is there any effi... |
[This answer][1] makes the claim that [the Discrete Log problem][2] and RSA are independent from a security perspective.
RSA labs makes a [similar statement][3]:
> The discrete logarithm problem bears the same relation to these systems as factoring does to the RSA system: the security of these systems rests on t... |
Would the ability to efficently find Discrete Logs have any impact on the security of RSA? |
Diffie-Hellman rests on the assumption that discrete log (in the underlying group) is hard. Although DH was originally specified in the multiplicative group of integers modulo a prime, it has since become taken to be the corresponding algorithm in any group where discrete log is assumed to be hard.
RSA security rel... |
According to [this][1]:
> To summarize: solving the discrete logarithm problem for a composite modulus is exactly as hard as factoring and solving it modulo primes.
So, given your question "Would the ability to efficiently find Discrete Logs have any impact on the security of RSA?" the answer would be yes. Furthe... |
Would the ability to efficiently find Discrete Logs have any impact on the security of RSA? |
A [(synchronous) **stream cipher**](http://en.wikipedia.org/wiki/Stream_cipher#Synchronous_stream_ciphers) is an algorithm which maps some fixed-length key to an arbitrary-length *key-stream* (i.e. a sequence of bits): $C : \{0,1\}^k \to \{0,1\}^{\infty}$.
This key-stream is then XOR-ed with the plain text stream, g... |
What is the difference between a stream cipher and a one-time-pad? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.