instruction stringlengths 15 30k |
|---|
One thing that perplexes me somewhat about the cryptographic community is how people seem to hate LCGs and write them off without much effort to repair their flaws, and yet also like LFSRs and have repaired them often.
## Raw LCGs and LFSRs Are *Both* Weak
In Schneier's [_Applied Crypography_](https://www.schnei... |
How Brittle Are LCG-Cracking Techniques? |
Does MD5 hash have quasi commutative property? |
If you have a string S, then the string can be composed of four things:
a: cleartext
b: 'random' data
c: encrypted data
d: compressed or otherwise non-encrypted, but modified, cleartext
If you want to see if the string is an encrypted message, 'c', then you might construct a test for 'randomness', say the test... |
If you have a string S, then the string can be composed of four things:
1. cleartext
2. 'random' data
3. encrypted data
4. compressed or otherwise non-encrypted, but modified, cleartext
If you want to see if the string is an encrypted message, (3), then you might construct a test for 'randomness', say ... |
I recently got into learning Elliptical curve cryptography and are currently building a project in C#.
Everything is working well so far, I can encode and decode points, and thanks to this forum I can do point addition and doubling really fast. Now I want to take the next step and start using really big numbers, so... |
**1. What standard curves could I use? I know curves like p192 etc exists, am I allowed to use these?**
Yes, of course you may use those, for more curves - including safer ones - check [the safecurves website](http://safecurves.cr.yp.to).
**2. How can I find valid points to use for messages and generator on these... |
What does $Z_q^n$ mean?
References:
e.g. in the [given link][1].
or on the 2nd paragraph of page: http://en.wikipedia.org/wiki/Learning_with_errors
[1]: http://upload.wikimedia.org/math/e/5/5/e5586e644d7a272335169a020015fe9f.png |
What does $Z_q^n$ mean in this notation?
![][1]
References: on the 2nd paragraph of page: http://en.wikipedia.org/wiki/Learning_with_errors
[1]: https://i.stack.imgur.com/AAUxN.png
[2]: http://upload.wikimedia.org/math/e/5/5/e5586e644d7a272335169a020015fe9f.png |
The embedded device is a low-power 8-bit microcontroller (memory usage is constrained to about 10kb code, 1kb ram). As the device is battery-powered and manual service should be minimal, more powerful processors are not an option.
Throughput is very limited, so performance is not too much of an issue.
The system ... |
If you have a DSA/ECDSA signature, which is supposed to be DER encoded as an ASN.1 sequence of r and s (as in the RFC), if you're given some bytes which are ``"some valid DER encoded ASN.1" || "some extra bytes"``, is the correct behavior to error out, or proceed to attempt to verify just the DER encoded portion of the... |
Verifying DER encoded DSA/ECDSA signature with extra content? |
If you have a string S, then the string can be composed of four things:
1. cleartext
2. 'random' data
3. encrypted data
4. compressed or otherwise non-encrypted, but modified, cleartext
If you want to see if the string is an encrypted message, (3), then you might construct a test for 'randomness', say ... |
It will depend entirely on the specific encryption scheme. There is really no theoretical reason why a ciphertext should not be clearly identifiable as being a ciphertext and not a plaintext. In fact, take any encryption scheme and modify it so that the encryption algorithm works as before, only it appends to the ciphe... |
I read a lot of stuffs about entropy/randomness. But **what if a random generator (either digits or strings) once output a "human" patern ?**
I know it is very unlikely to happen, but **if a random code pin generator generates a "1 2 3 4 " pin code, what would we say ?** It would be generated by a random generator ... |
Issue about randomness : what if random looks "human" ? |
Short answer / tl;dr: Yes, that can occur, but it is no problem most cases.
The sequence "1234" would be a perfectly normal output for a generator which ouputs a pattern of 4 numbers from 0 to 9. If every possible sequence has the same probability of being used as output (called being uniformly distributed), than "1... |
I'm currently reversing an AES implementation for disk encryption. The odd thing I'm stumbled about is a key schedule where the encryption round keys are not the same as the decryption round keys (in "reversed order"). Altough the first 4 bytes, i.e. the first round key for the encryption, and the last 4 bytes, i.e. th... |
Is there an alternative AES schedule? |
I am writing a java program to encrypt a message using 256-bit AES encryption, but I am getting `illegal key size error`, I have read that I have to use some JCE Unlimited Strength Jurisdiction Policy Files to encrypt/decrypt message with key of 256-bit or longer, but I do not understand why there is a limit on using a... |
Why there are limitations on using encryption with keys beyond certain length? |
Does SHA-1 hash have quasi commutative property? |
mcrypt's implementation of RC2 has a fixed effective length of 1024 bits, however, it is possible to simulate keys with effective lengths between 1-1024 by doing something like this:
http://php.net/manual/en/function.mcrypt-generic-init.php#111496
My question is... is there a similar technique that can be used w... |
mcrypt's implementation of RC2 has a fixed effective length of 1024 bits, however, it is possible to simulate keys with effective lengths between 1-1024 by doing something like this:
http://php.net/manual/en/function.mcrypt-generic-init.php#111496
My question is... is there a similar technique that can be used w... |
Rijndael supports block lengths of 128, 192 and 256. AES does not but Rijndael does.
What other algorithms support variable block lengths? Or is Rijndael unique in that regard? |
Why go through the trouble of using the HMAC_DRBG process, instead of simply hashing [message | private key] to calculate k?
If the resulting k or the signature is invalid, then a known byte value can be appended to the input, and re-hashed, until an acceptable result is achieved:
k = h([message | private key | 0x0... |
RFC 6979 - Why not simply hash the message & the private key for deterministic ECDSA? |
Why go through the trouble of using the HMAC_DRBG process, instead of simply hashing [message | private key] to calculate k for [deterministic ECDSA](http://tools.ietf.org/html/rfc6979)?
If the resulting k or the signature is invalid, then a known byte value can be appended to the input, and re-hashed, until an acce... |
In some cryptographic protocols I have seen messages protected for confidentiality, authenticity, replaying attacks, reordering attacks etc. What protects a protocol from an attacker in a privileged network position (e.g. in control of a majority of the fibre networks connecting countries) from just dropping messages a... |
In cryptographic protocols, what protects against an attacker dropping messages? |
Why go through the trouble of using the HMAC_DRBG process, instead of simply hashing `[message | private key]` to calculate $k$ for [deterministic ECDSA](http://tools.ietf.org/html/rfc6979)?
If the resulting $k$ or the signature is invalid, then a known byte value can be appended to the input, and re-hashed, until a... |
mcrypt's implementation of RC2 has a fixed effective length of 1024 bits, however, it is possible to simulate keys with effective lengths between 1-1024 by doing something like this:
http://php.net/manual/en/function.mcrypt-generic-init.php#111496
My question is... is there a similar technique that can be used w... |
I need to make it clear I know nothing about crypto so in that context I'm hoping to clear up some confusion:
As I understand it a "round" in a cipher is one encryption operation and a cipher like AES has multiple rounds. Did I get this right?
I've seen descriptions of attacks against a cipher say something like... |
It seems that this is pretty difficult to find large (above 1024 bits) strong primes, or at least such primes p where (p-1) has a very large prime factor. Is there any information regarding the distribution of strong primes vs. other primes? The GNU library generates strong primes for RSA?
Thanks,
Boaz |
I am trying to implement simple El-Gamal cryptosystem.
And I can't understand how to represent message as an integer between $1$ and $n-1$.
The only thing that comes to my mind is:
if $n$ bit length is $k$, then divide input message m on $t | t < k$ bits and each piece of bits use as integer number.
I think It... |
How do you represent integers on a computer? In binary format:
$$71_{dec} = 100\,0111_{bin} $$
How do we represent letters on a computer? (Mostly) in [ASCII][1] format (and ASCII is in binary):
$$\text{A} = 100\,0001_{bin}$$
How do we represent more than one letter on a computer? We concatenate the seperate... |
I've seen NIST requirements about key length. What about the output lengths ?
Is 112 bits enough for the HMAC output length ? Can we truncate the tag to keep only 112 bits ?
Thank you |
Requirement for the length of a HMAC tag? |
Why go through the trouble of using the HMAC_DRBG process, instead of simply hashing `[message | private key]` to calculate $k$ for [deterministic ECDSA](http://tools.ietf.org/html/rfc6979)?
If the resulting $k$ or the signature is invalid, then a known byte value can be appended to the input, and re-hashed, until a... |
Suppose I generated a set of $n$ integers (big enough) $a_{(1)} = \{a_1, \dotsc, a_n\}$ (actually I can have as many $a_{(i)}$ as possible). Now I need to get an integer set $b = \{b_1, \dotsc, b_n\}$ (alse big enough) such that $\langle a_{(i)}, b \rangle = c_{(i)}$, for all $i$. I don't know what $c_{(i)}$ is but I c... |
Is this problem based on a known hard problem? |
Suppose I generated an $n$-dimentional vector $a_{(1)} = [a_1, \dotsc, a_n]$ with integer component (actually I can generate as many $a_{(i)}$ as possible). Now I need to get an vector $b = [b_1, \dotsc, b_n]$ such that $\langle a_{(i)}, b \rangle = c_{(i)}$, for all $i$. I don't know the value of $c_{(i)}$ but I can v... |
Can anyone point me to a C++ crypto library with an implementation of a pseudo random function (PRF)? I don't have much background in crypto theory, but I am in the middle of a graduate course introducing applications of crypto, so I have a basic understanding of the tools available to me. The research paper I am imple... |
I know the usual way of using getting shared secrets for encryption with ECC is DH, however, this only works with two keypairs of exactly the same kind, for example two curve25519- or two p256-keypairs.
With ElGamal, one can get a symmetric key for a recipients public key no matter which kind of key they are using... |
ECC - ElGamal with Montgomery or Edwards type curves (curve25519, ed25519) - possible? |
ElGamal works for any ring. What is badly specified is the glue between the protocols (some network packets) and the exact implementation variants in the math library.
c25519 use arithmetic over montgomery curves.
ed25519 use arithmetic over twisted edwards curves.
huff curves implementations can be even "fa... |
ElGamal works for any ring. What is badly specified is the glue between the protocols (some network packets) and the exact implementation variants in the math library.
C25519 use arithmetic over Montgomery curves.
Ed25519 use arithmetic over twisted Edwards curves.
Huff curves implementations can be "faster"... |
ElGamal works for any ring. What is badly specified is the glue between the protocols (some network packets) and the exact implementation variants in the math library.
C25519 use arithmetic over Montgomery curves.
Ed25519 use arithmetic over twisted Edwards curves.
Huff curves implementations can be "faster"... |
Why go through the trouble of using the HMAC_DRBG process, instead of simply hashing `[message | private key]` to calculate $k$ for [deterministic ECDSA](http://tools.ietf.org/html/rfc6979)?
If the resulting $k$ or the signature is invalid, then a known byte value can be appended to the input, and re-hashed, until a... |
SHA-1 is on the way to deprecation, in particular for digital certification (x509). But I can't find ressources about SHA-1 deprecation from SSL/TLS Cipher Suites.
Is it implicit, as deprecation implies that SHA-1 usage will be deprecated in all cases ? Or is there a different strategy concerning SHA-1 usage in Cip... |
SHA-1 is on the way to deprecation, in particular for digital certification (x509). But I can't find ressources about SHA-1 deprecation from SSL/TLS Cipher Suites.
Is it implicit, as deprecation implies that SHA-1 usage will be deprecated in all cases ? Or is there a different strategy concerning SHA-1 usage in Cip... |
How do you represent integers on a computer? In binary format:
$$71_{dec} = 100\,0111_{bin} $$
How do we represent letters on a computer? (Mostly) in [ASCII][1] format (and ASCII is in binary):
$$\text{A} = 100\,0001_{bin}$$
How do we represent more than one letter on a computer? We concatenate the seperate... |
I am confused about the notion of "pepper" in the context of storing hashes of users' passwords.
**Definition 1: A pepper is a secret key**
Looking around the Internet, for example [here][1] or [here][2], a pepper is frequently defined to be a fixed and randomly chosen string that flows into the computation of a ... |
Does Ed25519 support cryptographic threshold signatures? |
I'm trying to get a better understanding of cryptographic hashing. Take this example transformation function:
digest [i] = ((129 * message[i]) XOR message[i-1]) % 256
Assuming both digest and message are 16 bytes in length. Is it possible to reverse this formula to solve/isolate for message[i]?
Here is my... |
Are RSA and Elgamal partially homomorphic techniques? which one is better if one want to use it for practical purpose? and is there some FHE technique which can be used practically? |
I've written some questions in this stackoverflow and got great responses but now I'm trying to wrap it all together.
I have for the last couple of weeks been building a serial key generator project in C# to use in my own software. The goal is to be able to generate serial keys for customers of my software. To stop ... |
Creating serial key generator using ECDSA, how to get signature short enough? |
If one wants to keep the receiver's name non encrypted, but it also appears in the encrypted message - will it leak information? (other than the receiver's name, of course.)
Let's assume a "bad" case - where there are many messages to the same person, and that the name in the encrypted message will always appear in ... |
Repeating something encrypted and non-encrypted? |
A simple symmetric encryption scheme uses the same key, derived from a password, for both directions of the communication. Is this bad practice, and if so what should be done about it? Is it 'good enough' for many things? |
Using the same symmetric key in both directions? |
The signature with the 256-bit curve should be 64 bytes, not 128. Was that a typo or are you doing something wrong?
If you encode that in Base16 (hex), the efficiency is 50%, so you would get 128 characters.
Instead, if you go with Base64, you'd get 75%, so you would be looking at 86 characters.
Since this is no... |
The signature with the 256-bit curve should be 64 bytes, not 128. Was that a typo or are you doing something wrong?
If you encode that in Base16 (hex), the efficiency is 50%, you would get 128 characters.
Instead, if you go with Base64, you'd get 75%, so you would be looking at 86 characters.
Since this is not a... |
Double Hashing can surely provides more security than only 1 layer of hashing but does that necessarily mean it is more collision resistant? This question in a more math form: If H is a collision resistant hash function, is H(H(x)) for some x still collision resistant? |
Is double Hashing Collision resistant? |
I am confused about the notion of "pepper" in the context of storing hashes of users' passwords.
**Definition 1: A pepper is a secret key**
Looking around the Internet, for example [here][1] or [here][2], a pepper is frequently defined to be a fixed and randomly chosen string that flows into the computation of a ... |
I'm trying to get a better understanding of cryptographic hashing. Take the example transformation function below, is it possible to reverse this formula to solve/isolate for message[i]?
digest [i] = ((129 * message[i]) XOR message[i-1]) % 256
Here is my attempt in python. I Assume both digest and message ar... |
Double hashing can surely provide more security than only one layer of hashing but does that necessarily mean it is more collision resistant? This question in a more mathematical form: If $H$ is a collision resistant hash function, is $H\circ H\colon\;x\mapsto H(H(x))$ still collision resistant? |
Is double hashing collision resistant? |
One thing that perplexes me somewhat about the cryptographic community is how people seem to hate LCGs and write them off without much effort to repair their flaws, and yet also like LFSRs and have repaired them often.
## Raw LCGs and LFSRs Are *Both* Weak
In Schneier's [_Applied Crypography_](https://www.schnei... |
My system forwards encrypted and/or signed messages on a gossip network. Replay is part of the design. What should I do with the nonce? I'm tempted to just set it to the same number always. Is this a bad idea? |
I don't care about replay attacks. What should I do with the nonce in nacl? |
There are published techniques for cracking LCGs, but to my eye those techniques seem very brittle — very minor changes add nonlinearity that renders techniques like the LLL algorithm unusable. Or, am I mistaken, are these variations still easy to crack?
## Background
One thing that perplexes me somewhat about ... |
There are published techniques for cracking LCGs, but to my eye those techniques seem very brittle — very minor changes can add nonlinearity that renders techniques like the LLL algorithm unusable. Or, am I mistaken, are these variations still easy to crack?
## Background
One thing that perplexes me somewhat ab... |
Suppose I generated an $n$-dimentional vector $a_{(1)} = [a_1, \dotsc, a_n]$ with integer component (actually I can generate as many $a_{(i)}$ as possible). Now I need to get an vector $b = [b_1, \dotsc, b_n]$ such that $\langle a_{(i)}, b \rangle = c_{(i)}$, for all $i$. I don't know the value of $c_{(i)}$ but I can v... |
I'm attempting to diagram PBKDF2 for a school project and I'm not 100% sure how to represent the XOR step. Specifically, I'm confused as to whether the output of the XOR step is used in subsequent rounds or if it is calculated each round in order to make all rounds identical. Here's a diagram showing what it might look... |
How exactly is the output of the XOR step in PBKDF2 used? |
I transfered a code routine from Java to Python:
import base64
import hashlib
class Cipher(object):
def __init__(self, key):
self.key = key
def decrypt(self, message):
message = base64.b64decode(message)
message = bytearray(mes... |
What cipher algorithm is this routine using? |
I am actually looking for available crypto libraries including a deterministic random generator for the purpose of a dedicated crypto key generator unit.
I have a simple question about X9.31 based PRNG as proposed for instance in Botan library, since I noted that NIST SP800-131 document indicates that use of X9.31 ... |
Will X9.31 remain a secure & acceptable deterministic random generator beyond 2015? |
Here is and image hidding some information http://screencast.com/t/v8NkmfFTR
I need to discover, what is the hidden text.
I tried to interpret this as 27 letter alphabet(with space) in columns, tried this with Ceasar cipher.
No meaningfull English word has occured.
Does somebody have an idea what else can I tr... |
What approach is used here? |
Here is an image hidding some information http://screencast.com/t/v8NkmfFTR
I need to discover, what is the hidden text.
I tried to interpret this as 27 letter alphabet(with space) in columns, tried this with Ceasar cipher.
No meaningfull English word has occured.
Does somebody have an idea what else can I try... |
You tried interpreting this as a ternary code written in columns, but why not in rows?
It was really quite simple to solve.
Here's the code I used:
for n in ['110','012','111','120','112','001','011','012']:
x = int(n,3) + 64
if x==64:
x=32
print chr(x),
and here'... |
Most of the time, when some data must be encrypted, it must also be protected with a [MAC][1], because encryption protects only against passive attackers. There are some nifty encryption modes which include a MAC ([EAX][2], [GCM][3]...) but let's assume that we are doing old-style crypto, so we have a standalone encryp... |
about the proof in semi-honest model? |
Why proving "parties' views are simulatable" is enough in semi-honest model? |
In the context of lattice-based cryptography, in particular the Learning With Errors (LWE) problem, I see some definitions given in terms of equations modulo 1 (see for example, Appendix A of [this paper](http://www.cims.nyu.edu/~regev/papers/lwesurvey.pdf)).
Can someone explain why such modulo is used? It simply do... |
From 'Methods of Symmetric Cryptanalysis' by Dmitry Khovratovich,
" The data-dependent operations are one of the most controversial design concepts. We say that an operation is data-dependent, if it is expressed as a family of functions indexed by input data. The examples are key-dependent S-boxes, key- and message-... |
Why is proving "parties' views are simulatable" enough in semi-honest model? |
TOTP (Time-based One-Time Password) as I understand is an algorithm that uses the current time as a variable along with a shared key to generate a secured token. Wiki page for reference: http://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm
What I wanted to know is whether it is possible to determine t... |
From 'Methods of Symmetric Cryptanalysis' by Dmitry Khovratovich,
> The data-dependent operations are one of the most controversial design concepts. We say that an operation is data-dependent, if it is expressed as a family of functions indexed by input data. The examples are key-dependent S-boxes, key- and message-... |
From 'Methods of Symmetric Cryptanalysis' by Dmitry Khovratovich,
> The data-dependent operations are one of the most controversial design concepts. We say that an operation is data-dependent, if it is expressed as a family of functions indexed by input data. The examples are key-dependent S-boxes, key- and message-... |
There are published techniques for cracking LCGs, but to my eye those techniques seem very brittle — very minor changes can add nonlinearity that renders techniques like the LLL algorithm unusable. Or, am I mistaken, are these variations still easy to crack?
## Background
One thing that perplexes me somewhat ab... |
I am confused about the notion of "pepper" in the context of storing hashes of users' passwords.
**Definition 1: A pepper is a secret key**
Looking around the Internet, for example [here][1] or [here][2], a pepper is frequently defined to be a fixed and randomly chosen string that flows into the computation of a ... |
Here's my issue and someone can help me understand it so I can program it correctly.
I have a point(X,Y) on an Elliptical Curve E(a,b) where a=-3 and B is a large number that is in hexidecimal from -51BD. To compress this point oficially in a program, we know that every X on the curve has two Y's, one even and o... |
I am actually looking for available crypto libraries including a deterministic random generator for the purpose of a dedicated crypto key generator unit.
I have a simple question about the X9.31 based PRNG as proposed for instance in Botan library, since I noted that NIST SP800-131 document indicates that use of the... |
Let's say I do this:
$ cat pubkey.txt
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0
FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/
3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB
---... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.