instruction stringlengths 15 30k |
|---|
Why can't you simply ask the person who made that file to tell you the password?
No one knows how to decode an AES-encrypted file, such as password-protected WinRar files, without knowing the password.
As far as we know, the only way to decode AES-encrypted files is to somehow obtain the right password, and then ... |
Many AES-encrypted things (files, strings, database entries, etc.) start with "Salted__" ("U2FsdGVkX1" in base64).
I hear it's some sort of OpenSSL interoperability thing [a][1] [b][2] [c][3].
Is there some standard reference somewhere (perhaps an RFC?) that explains how such OpenSSL-inter-operable AES-encrypted th... |
Is there a standard for OpenSSL-interoperable AES encryption? |
Many AES-encrypted things (files, strings, database entries, etc.) start with "Salted__" ("U2FsdGVkX1" in base64).
I hear it's some sort of OpenSSL interoperability thing [a][1] [b][2] [c][3].
Is there some standard reference somewhere (perhaps an RFC?) that explains how such OpenSSL-inter-operable AES-encrypted th... |
I have several questions concerning the original Paillier cryptosystem as described in Paillier, Pascal (1999).
"Public-Key Cryptosystems Based on Composite Degree Residuosity Classes".
EUROCRYPT. Springer. pp. 223-238. [http://www.springerlink.com/content/kwjvf0k8fqyy2h3d/?MUD=MP][1]
Notation:
$p$ - unencrypte... |
I'm currently using SSL with AES-CBC and HMAC for a file transfer containing string M. Now suppose Alice already knows SHA1(M) (and the adversary does **not**), and she downloads M from Bob using **only** AES-CBC without a MAC.
Normally this would be ill-advised, but since she can check SHA1(M) after the download c... |
Can I jettison MAC if I already have SHA1(M)? |
I am redesigning a password reset email mechanism because the existing implementation scares the hell out of me. My goal is to generate reset codes that are:
* Expired
* Tamper Resistant
* Single Use
* Resistant to replay attacks
The format of the reset code I have come up with is:
B64(B64(iv)||B64(E(uid||t... |
It is easy to see that this secure, in the sense that the attacker cannot cause Alice to accept any download except for the file that Bob originally sent.
This remains true even if the attacker knows the encryption (CBC) key (alternatively, Alice and Bob doesn't bother to encrypt the message at all), and if the atta... |
> In what sort of circumstances would an attacker potentially be able to detect a pattern from a series of hashed passwords?
I think the most direct answer is: When the hashing algorithm is not cryptographically secure. The main four points of cryptographic hash function evaluation are as follows ([quoting wikipedi... |
Let's say I'm a lazy user of a system with annoyingly frequent password change policies. I may have a "good" password I used initially that is only used for this system but since I have to change it every week I'm just going to increment or decrement a number. E.g.
Week 1: 545h9yEQ8k37t!VW53d7g6263!&D4grz
W... |
Can a "pattern" in a series of passwords be detected from their hashes (and maybe a single raw password)? |
Summary: If it matters, you have bigger problems to deal with.
---
The first question is approximately *How resistant is the hash to differential cryptanalysis?*
Hashes are primarily designed to be collision/preimage-resistant, but it is often assumed that the hashes also behave as pseudorandom functions (e.g.... |
I am redesigning a password reset email mechanism because the existing implementation scares the hell out of me. My goal is to generate reset codes that are:
* Expired
* Tamper Resistant
* Single Use
* Resistant to replay attacks
The format of the reset code I have come up with is:
B64( B64( iv ) || B64... |
Is this a secure implementation of password reset email? |
Are there any security risks using a single key-pair for both key-exchange and signing?
I'm mainly interested in using Curve25519 for key-exchange and Ed25519 for signing. But similar combinations, such as EC-DH and EC-Schnorr or even EC-DSA with the same key pair would be interesting too.
* Curve25519 hashes the... |
Consider this algorithm:
def ksa(k):
L = length(k)
j = 0
for i from 0 to L:
j = j + k[k[i] % L]
swap(k[i], k[j])
`k` is an array of integers $0 \leq x < 256$. The questions is how to enumerate all possible arrays `k` resulting in an array with given prefix $P$. In... |
On a general basis, you want to keep encryption and signature keys disjoint, because they tend to have distinct life cycles. In broad terms, an encryption key should be escrowed, because loss of the private key implies loss of the data which is encrypted relatively to the public key. However, a signature key _must not_... |
>Background:
> I've been thinking about using encryption in the context of backing up files to untrusted locations (to the point of making the file publicly and widely distributed for practically failsafe backup).
>
>The problem is, once a file is publicly available, it will forever remain so. And in 20 years, when... |
The method described in [the link you cited](http://www.cs.umd.edu/~jkatz/imc/hash-erratum.pdf) is based on [Floyd's cycle finding algorithm](http://en.wikipedia.org/wiki/Cycle_detection#Tortoise_and_hare), also known as "the tortoise and the hare" algorithm. This is a general-purpose algorithm for detecting cycles in... |
The method described in [the link you cited](http://www.cs.umd.edu/~jkatz/imc/hash-erratum.pdf) is based on [Floyd's cycle finding algorithm](http://en.wikipedia.org/wiki/Cycle_detection#Tortoise_and_hare), also known as "the tortoise and the hare" algorithm. This is a general-purpose algorithm for detecting cycles in... |
I'm playing around with work-factor hash functions, and I'm looking for a memory-hard operation to make it resistant to GPU / parallel hardware attacks. I considered a very large (i.e. 64K) s-box that gets shuffled based on the state per round, but I have a feeling that there are ways to optimise such an operation for ... |
Yes and no.
A threshold cryptosystem means the decryption key can be split into $n$ shares such that only $t\leq n$ are required to recover it. That property in isolation is not useful for multiparty computation.
However when you combine a threshold cryptosystem with one that is at least partially homomorphic (me... |
Well, first off, it appears that these requirements are a bit confused. If the requirement is that for a given modulus $N$ and public exponent $e$, that the corresponding private exponent $d$ satisfies $d > N/2$, that rules out all public keys (!). You can see that from the necessary and sufficient relation $de = 1 \... |
I'm trying to implement a modified version of the ElGamal cryptosystem as specified by Cramer et al. in "[A secure and optimally efficient multi-authority election scheme][1]", which possesses additive homomorphism between ciphertexts, as opposed to the original version, which presents multiplicative homomorphism.
T... |
While I haven't read the paper, I believe I can answer these questions:
> 1. I'm not sure if the implied modulus of each operation is $q$, as I added myself to the above formulas. Could someone please clarify this? The paper omits it...
No, the arithmetic is done modulo $p$. Remember, you're working in a subgrou... |
Consider this algorithm:
def ksa(k):
L = length(k)
j = 0
for i from 0 to L:
j = (j + k[k[i] % L])%L
swap(k[i], k[j])
`k` is an array of integers $0 \leq x < 256$. The questions is how to enumerate all possible arrays `k` resulting in an array with given prefix $P$... |
Consider this algorithm:
def ksa(k):
L = length(k)
j = 0
for i from 0 to L: #[0..L-1] (non inclusive "to")
j = (j + k[k[i] % L])%L
swap(k[i], k[j])
`k` is an array of integers $0 \leq x < 256$. The questions is how to enumerate all possible arrays `k` resulting in... |
I'm trying to implement a modified version of the ElGamal cryptosystem as specified by Cramer et al. in "[A secure and optimally efficient multi-authority election scheme][1]", which possesses additive homomorphism between ciphertexts, as opposed to the original version, which presents multiplicative homomorphism.
T... |
I have a PDF document intended for long-term (many years, maybe decades) archival which I would like to digitally sign with my personal certificate to ensure its integrity.
As far as I understand, I need to timestamp the signature in order to ensure it remains valid even after certificate expiration.
Let's say I ... |
Let `(E,D)` be a secure block cipher.
Consider the following tweakable block cipher:
E'(k,t,x) = E( (k+t) mod |K|, x)
D'(k,t,c) = D( (k+t) mod |K|, c)
Is `(E',D')` secure?
|
Tweakable Scheme Secure? |
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 was wondering about making up a simple system to encrypt a file:
seed the random number generator with the passcode
generate as many random bits as the file has
xor
This has a vulnerability that if you encrypt two file A and B with the same passcode, xoring the two encrypted files would give the x... |
Is there a way to break this encryption? |
What you are doing sounds a lot like what the [/dev/random and /dev/urandom][1] or the [PRNGD][2] on many systems already do:
those systems take an arbitrary large sequence of numbers (from a true [hardware random number generator][3] if available, or else from environmental noise such as keystroke timing)
and feed i... |
I was wondering about making up a simple system to encrypt a file:
seed the random number generator with the passcode
generate as many random bits as the file has
xor
This has a vulnerability that if you encrypt two file A and B with the same passcode, xoring the two encrypted files would give the x... |
I was wondering about making up a simple system to encrypt a file:
seed the random number generator with the passcode
generate as many random bits as the file has
xor
This has a vulnerability that if you encrypt two file A and B with the same passcode, xoring the two encrypted files would give the x... |
Your permutation idea is leaving the realm of encryption and trying to address a different type of idea: authentication. Encryption hides the bits, authentication gives confidence that they are being read as intended.
But it doesn't do this properly, the attacker might still be able to flip bits. What if the random ... |
How secure is libgcrypt's Elgamal implementation of encryption (how different it is from textbook Elgamal), and how can I tweak padding and other preprocessing actions?
For example, I know that usign RSA I can use this S-expression to the `function gcry_pk_encrypt`:
(data
(flags pkcs1)
(value BL... |
Can I build a secure tweakable block cipher from a normal one by adding key and tweak? |
Consider the Miyaguchi–Preneel construction:
$H_0 = E(0,m_0) \oplus m_0$ (0 here means a vector filled with zeros)
$H_1 = E(H_0,m_1) \oplus H_0 \oplus m_1$
where $E(K,M)$ is a block cipher (for example AES), $m_0, m_1$ are messages.
What's the best way to find messages $m_0$, $m_1$, such that $H_1$ will h... |
Yesteryears problems of communication privacy has been well defined in cryptography through Asymmetric cryptography.
Due to rise in Cloud computational model , computational heavy tasks are being outsourced to a remote server for economic reasons, and there is need for computational privacy .
Is there any crypto... |
In outsourced computation, privacy *of the computation itself* is usually not important. You have your encrypted data in the cloud, and you want the cloud to perform a computation on it, on your behalf, so that you get *no information* about what computation was actually done?? That seems totally useless. Far more like... |
Is it good to used a mouse movement as a random seed for Pseudorandom Generator like AES-Counter Mode?
should I only need to get X and Y coordinates in the mouse movement? |
Is it good to used a mouse movement as a 64-bit random seed for Pseudorandom Generator like AES-Counter Mode?
should I only need to get X and Y coordinates in the mouse movement? |
There are a few questions here.
- Are mouse movements a good entropy source? In general no, but there are a number of programs that will ask the user to move the mouse randomly, sample the position at intervals, and use many samples as a source of entropy for random number generation.
- Can you use mouse movem... |
Is it good to use a mouse movement as a 64-bit random seed for a Pseudorandom Generator like AES in Counter Mode?
Should I only need to get the X and Y coordinates of the mouse movement? |
Are mouse movement coordinates useful as a seed for a RNG? |
From what I know, the HMAC constructions has two strength:
1. It's resistant to length extensions
2. Since the key is consumed before the message, the attacker does not know the initial state, preventing simple collision attacks.
But the simple construction $ \mathrm{Hash}(\mathrm{Hash}(\mathrm{key} ∥ \mathrm{me... |
I'm conceiving an application that uses cryptographic tools and concepts for securing data. I know that's difficult and risky, therefore I prefer to ask around before implementing anything.
When using generic length-extension for hash functions, such as SHA256d where, if I'm correct, "d" stands for the number of tim... |
So I was trying to understand the basic difference between erasure coding and secret sharing, and I found this paper (that you can find [here][1] or [here][2]).
For what I understand, it states that Shamir's Secret Sharing is basically a particular instance of a Reed-Solomon Code;
However I cannot really understa... |
Does the same encryption algorithm given the same plaintext always produces the same ciphertext?
Does this cause any security flaws? |
Some cryptographic algorithms are as strong as the size of their key is, while other have some weaknesses that limit their strength (such as SHA-1). How strong is the ECDSA algorithm, and does that strength depend on anything (for example, the curve used and so forth)? |
I need to send data between two applications. I've got requirement that says that data should be transmitted using secure protocol such as SSL/TLS. Data is sent using TCP sockets and I don't have built in SSL/TLS support. However, I'm able to encrypt content using AES and I'm also able to exchange small amount of data ... |
Are there any security risks using a single key-pair for both key-exchange and signing?
I'm mainly interested in using Curve25519 for key-exchange and Ed25519 for signing. But similar combinations, such as EC-DH and EC-Schnorr or even EC-DSA with the same key pair would be interesting too.
* Curve25519 hashes the... |
Is there any 128-bit pseudorandom number generator available?
I tried the [Blum Blum Shub Generator][1], but I can't produce a 128-bit pseudo-random number.
Maybe before I produce a 128-bit pseudorandom number, I need to input a 128-bit prime number which is hard to determine.
[1]: http://en.wikipedia.org/wiki/... |
I am attempting to do a final semester project where I implement Diffie-Hellman key exchange on an elliptic curve over an extension field (2^256). Can anybody help me to generate the extension field for this project? |
Adaptive Hash Functions: How to tell how many iterations were used? |
I understand that hashing a datetime is a pseudo-random number, and not good in a security context.
But what about hashing a datetime plus a truly-random but constant string (just a string that an "attacker" could not possibly guess)?
This is not a question for a practical implementation, just a theoretical quest... |
Is just a bit of random, "fully random"? |
I've written encryption/decryption routines using AES GCM. Code can be found [here](http://codereview.stackexchange.com/questions/13714/symmetric-encryption-decryption-routine-using-aes).
I recently realized that the cipher text is longer than I believe it should be. It *should* add the tag and IV onto the encrypted... |
Let's look at this from the bottom ("what is random?") to the top (is that secure?).
When we talk about "random" in cryptography we almost always prefer to talk about "entropy". The intuitive and concise definition of cryptographic entropy is that it is a measure of how much information the attacker does not know ab... |
If you go through the math, it appears that exactly the expected amount of ciphertext expansion is happening. Here's what's happening:
- The GCM takes the plaintext as a byte string of size N, and generates a ciphertext which is a byte string of size N+28, where 12 of the 28 is the nonce, and the other 16 is the au... |
MD5 is a very fast hash and its output is short and easy to store. Should I use it for my non-security-sensitive application?
I don't think so, but I can't seem to convince anyone else that this is true. |
Should I use md5 for my new application? |
If you go through the math, it appears that exactly the expected amount of ciphertext expansion is happening. Here's what's happening:
- The GCM takes the plaintext as a byte string of size N, and generates a ciphertext which is a byte string of size N+28, where 12 of the 28 is the nonce, and the other 16 is the au... |
When I need to show to others that they are wrong and it is their word against mine, I look to the words of industry recognized experts and then challenge them to find an industry recognized expert that supports their belief.
In this case, Bruce Schneier [has][1] [written][2] [a][3] [lot][4] [on][5] MD5 (in Bruce st... |
![Visualization of CFB][1]
I can't understand what CFB really is. It said in Wikipedia that CFB is same as CBC, but I find that CFB is more difficult than CBC.
Can someone explain to me how CFB works. Such as how Initialization Vector(IV) work inside the Encryption Algorithm process together with the Key, and als... |
I can understand that ROT13 is not secure for obvious reasons, but I'm looking for the theoretical answer. Wikipedia says "The algorithm provides no cryptographic security.." What does it mean to provide cryptographic security? Why does it provide *no* security as opposed to, say, very little security?
What would ... |
Why does ROT13 provide no cryptographic security? |
I want to calcuate the CRC32 (algorithm http://www.libpng.org/pub/png/spec/1.2/PNG-CRCAppendix.html ) using polynomials directly but I don't know how. I found the generating polynomial listed here https://en.wikipedia.org/wiki/Cyclic_redundancy_check (this corresponds to 0xedb88320 in the example code).
So please ca... |
How do I calculate CRC32 mathematically? |
I have a file that is encrypted in AES using a 16 char string. The string is (a-zA-Z0-9) and .,?!. It also only contains words from a dictionary (but they can be lower/upper case). What would be the most effective way to brute force this?
No, I'm not trying to brute force passwords, who would store passwords in AES.... |
As sort of a follow up to my [(currently) unanswered question][1], if it is correct, how do i properly calculate and format the packet that actually stores the data being encrypted? I thought I knew what I was doing, but something here causes bouncycastle to freak out.
Using data from the [first post][1] and:
... |
RFC 4880 may be full of information, but it can be incredibly vague at times, so im looking for someone who actually knows the answer to this.
Given this public key:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: BCPG v1.39
mQGiBE5B0h8RBAD533Z5bK1IpBx02QyQL0QoJE4uFRIMGDiwXuwmZzVl+R7Vlurd
G... |
Are there any multiparty homomorphic encryption schemes ?
Most of the literature is about two party schemes .
Is there any generalization made for n party ? |
Are there any multiparty homomorphic encryption schemes? |
You should read the following paper:
* [Cascade ciphers: The importance of being first](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.36.5309&rep=rep1&type=pdf), Ueli M. Maurer and James L. Massey. Journal of Cryptology, volume 6, number 1, pp.55-61, 1993.
It covers exactly this topic. The conclusion... |
Lets say that we use init vector IV, key K and HMAC key H. Message is M.
Mode of operation is CBC !!!
We usually encrypt as this
C = crypt(M,K,IV) #encrypted data
R = C + MAC(C) # final result and + is for con cat
But we could use just:
R = len + crypt(M + H,K, IV) # notice... |
Why do we need extra hashing if we could use simpler scheme? |
I have a file that is encrypted in AES using a 16 char string. The string is (a-zA-Z0-9) and .,?!. It also only contains words from a dictionary (but they can be lower/upper case). What would be the most effective way to brute force this?
No, I'm not trying to brute force passwords, who would store passwords in AES.... |
Convergent encryption, also known as content hash keying, was first mentioned by John Pettitt on the cypherpunks list [in 1996][1], was used by [Freenet][2] and [Mojo Nation] [3] in 2000, and was analyzed in a technical report by [John Doceur et al. in 2002] [4]. Today it is used by at least [Freenet, GNUnet] [5], [flu... |
How many keystream that AES-Counter mode can produce if I am using 64-bit nonce and 64-bit counter? |
In .NET Framework, there is a cryptographic Random Number Generator (RNG) provider which enables to generate a cryptographically strong sequence of random bytes. [This provider][1] contain, among others, two methods:
- `GetBytes` which generates a sequence of random bytes, and
- `GetNonZeroBytes` which does t... |
Why x00 is usually avoided in salt? |
Consider the following code and output:
public static void Main() {
DESCryptoServiceProvider symAlg = new DESCryptoServiceProvider();
symAlg.BlockSize = 64;
symAlg.GenerateKey();
symAlg.Mode = CipherMode.ECB;
testCipher(symAlg, new byte[] {
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,... |
What is the deal with the .NET ECB final block? |
Consider the following code and output:
public static void Main() {
DESCryptoServiceProvider symAlg = new DESCryptoServiceProvider();
symAlg.BlockSize = 64;
symAlg.GenerateKey();
symAlg.Mode = CipherMode.ECB;
testCipher(symAlg, new byte[] {
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,... |
How many different keystream that AES-Counter mode can produce if I am using 64-bit nonce and 64-bit counter? |
Are there any practical implementations and or software platforms to prototype applications based on MPC ? |
This is not a limitation of the raw cryptographic primitives, like SHA, PBKDF, AES, etc, since the zero byte isn't processed any differently.
Since the purpose of a salt is generally to travel alongside a human password, libraries that handle the password as a string might also handle the salt as a string. Obviously... |
This is not a limitation of the cryptographic functions, like SHA or PBKDF, since the zero byte isn't processed any differently.
Since the purpose of a salt is generally to travel alongside a human password, libraries that handle the password as a string might also handle the salt as a string. Obviously, a `0x00` i... |
According to many sources, the first few (n) bytes of the RC4 keystream are strongly biased, and therefore should be discarded before using the keystream to encrypt anything; this precaution is commonly called RC4-drop-n.
There are [variants of RC4][1] available in SSH that do exactly that (arcfour128 and arcfour256... |
Does TLS use RC4-drop[n]? |
Within a closed computer network, I am ciphering some plaintext data as an added security measure. This is below several other layers of protection. For various technical reasons, I am restricted to plain-text, UTF-8 data. To that end, I have been using a Vigenère cipher with pre-shared key database. The keys range fro... |
Within a closed computer network, I am ciphering some plaintext data as an added security measure. This is below several other layers of protection. For various technical reasons, I am restricted to plain-text, UTF-8 data. To that end, I have been using a Vigenère cipher with pre-shared key database. The keys range fro... |
Considering a stream cipher that produces a ciphertext "c" from a message "m" and a key "k" is it possible to apply operations (multiplication and/or addition) directly to "c" without knowing the key ?
Example : m > encrypt > c > c+5 > decrypt > m+5
I can not manage to get a valid "m" at the end : I tried to work... |
Can I use a key-derivation-function as the hash function H in SRP? |
When using a "good", modern cipher (specifically one that provides ciphertext indistinguishability), is it a problem at all if there is some well-known structure in all plaintexts encrypted by an application?
For example, consider a simple protocol that transmits many messages that all start with an identical, but s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.