instruction
stringlengths
15
30k
How to compare between two cryptographic algorithms in terms of security?
How to evaluate SipHash function, in terms of security? And is there any tools that can help me to do this?
Evaluate SipHash function, in terms of security?
How to compare between two cryptographic algorithms (e.g. SHA-1 and SipHash) in terms of security? That is, how could one prove that algorithm X is more secure than algorithm Y?
How to compare between two cryptographic algorithms in terms of security?
I know this is a difficult subject but would a good defence against timing attacks be not sending an error message? so if something is wrong just don't send feedback? obviously this might not be a neat way to deal with it but would it be effective? Are there other ways to defend against timing attacks? I've found pa...
I know this is a difficult subject but would a good defence against timing attacks be not sending an error message? so if something is wrong just don't send feedback? obviously this might not be a neat way to deal with it but would it be effective? Are there other ways to defend against timing attacks? I've found pa...
I know this is a difficult subject but would a good defense against timing attacks be not sending a message if the decryption or authentication fails? So if the attacker provides a wrong HMAC for example and this is compared and found to be false you simply return nothing to the attacker (this is considering a network ...
Recently someone gave me an algorithim as follows: XOR = Key XOR Random1 XOR Random2. They think that in order for someone to extract "Key" from XOR they would need Random1 and Random2.. but looking at the above algorithm, i think it should be fairly easy for someone to guess or extract the Key w/o Random1 and ...
Recently someone gave me an algorithm as follows: XOR = Key XOR Random1 XOR Random2. They think that in order for someone to extract "Key" from XOR they would need Random1 and Random2.. but looking at the above algorithm, i think it should be fairly easy for someone to guess or extract the Key w/o Random1 and R...
For blind RSA signatures, is it problematic that RSA is half-homomorph? Take a scenario where blind RSA signatures are used for something like a voting procedure or [this proposal][1]: Lots of people, potentially malicious, are given the ability to sign a limited amount of messages without revealing the content of t...
Is the half-homomorphic property of RSA a problem for blind RSA signatures?
For blind RSA signatures, is it problematic that RSA is half-homomorph? Take a scenario where blind RSA signatures are used for something like a voting procedure or [this proposal][1]: Lots of people, potentially malicious, are given the ability to sign a limited amount of messages without revealing the content of t...
I feel foolish asking this, but will the hash generated by SHA-1 or other encryption methods ever have the possibility of containing a quote? Or any other characters that may be escaped such as ", ', and \ I am attempting to make a non-MySQL database to hold values such as hashes (and yes, I am aware that it is no...
Is there such a thing as a one way cipher that encrypts the input, but does so in a way that is non reversible? (i.e. given the key there is no possibility to decrypt the message) And in addition to that it behaves as normal ciphers do, so the encrypted message comes out the same each time you encrypt the same input...
Is there a non reversible cipher that outputs the same value for each instance of same input?
Can a cryptographically secure hash output the same value for each instance of same input?
I want a way to encrypt strings (like words, names) but I don't ever want to (myself or anyone else) be able to decrypt the strings. I found that perhaps what I am looking for is a cryptographically secure hash. But can it do these things 1 - preserve the length of the original string? 2 - preserve the for...
Is there a format preserving cryptographically secure hash?
I want a way to encrypt strings (like words, names) but I don't ever want to (myself or anyone else) be able to decrypt the strings. I found that perhaps what I am looking for is a cryptographically secure hash. But can it do these things 1 - preserve the length of the original string? 2 - preserve the for...
I want a way to encrypt strings (like words, names) but I don't ever want to (myself or anyone else) be able to decrypt the strings. I found that perhaps what I am looking for is a cryptographically secure hash. But can it do these things 1 - preserve the length of the original string? 2 - preserve the for...
I am a bit lost in understanding what I read on authentication, signature, etc. For instance, is the size of the ECDSA keys produced by `ssh-keygen -t ecdsa -b 256` linked to the hash used (SHA256) when computing the signature?
Does the size of a ECDSA key determine the hash algorithm?
I want a way to 'scramble' strings (like words, names) in a predictable way but I don't ever want to (myself or anyone else) be able to 'unscramble' the strings. I found that perhaps what I am looking for is a cryptographically secure hash. But can it do these things 1 - preserve the length of the original str...
I want a way to 'scramble' strings (like words, names) in a predictable way but I don't ever want to (myself or anyone else) be able to 'unscramble' the strings. I found that perhaps what I am looking for is a cryptographically secure hash. But can it do these things 1 - preserve the length of the original str...
I want a way to 'scramble' strings (like words, names) in a predictable way but I don't ever want to (myself or anyone else) be able to 'unscramble' the strings. I found that perhaps what I am looking for is a cryptographically secure hash. But can it do these things 1 - preserve the length of the original str...
In the context of password creation, a "salt" is data (random or otherwise) added to a hash function in order to make the hashed output of a password harder to crack. It is generally true people choose weak passwords, and it is certainly true there are gigabytes of [publicly available rainbow tables](https://crackst...
I am trying to test md5 collisions presented in this paper: https://eprint.iacr.org/2004/199.pdf I wrote a PHP script to test it, but it doesn't produce the expected hash output. I tested everything several times and found no errors in my code. I don't know what is wrong. Please help me to find the reason and ...
This was pretty vexing, but for some reason I could only create the "big endian" results given by table 2 in [this paper](http://merlot.usc.edu/csac-f06/papers/Wang05a.pdf). <?php $M0='02dd31d1 c4eee6c5 069a3d69 5cf9af98 87b5ca2f ab7e4612 3e580440 897ffbb8 0634ad55 02b3f409 8388e483 5a417125...
in PKCS#11, there is SignRecover method and VerifyRecover methods, where the data can be recovered from the signature. how these methods work? can i implement signrecover and verifyrecover with openssl?
How SignRecover and VerifyRecover work?
In PKCS#11, there are the SignRecover and VerifyRecover methods, <br> where the data can be recovered from the signature. How do these methods work? <br> Can I implement signrecover and verifyrecover with openssl?
How do SignRecover and VerifyRecover work?
I use HMAC(ciphertext)+ciphertext for authenticated encryption. The same key is used for both MAC and encryption. Is that right? Is using separate keys for MAC and encryption necessary or any good? I ask this beacause I have read somewhere that keys used for one role shouldn't be used for the other role.
Separate keys for encryption and MAC?
This was pretty vexing, but for some reason I could only create the "big endian" results given by table 2 in [this paper](http://merlot.usc.edu/csac-f06/papers/Wang05a.pdf). I get the same result as you for the first message (`$M.$N0`) : `8da3a17b43e0e134bdc17557ffef15ff` and a different value for the second message...
As I understood in FEAL-4 it needs 4 pair of round keys. Which means that we need to launch Fk function 4 times. My problem occurs starting the 2nd round. At the first round we have the original 64 bits key; which is sliced to 32 bits. So on the output of 1st round we have 32 bit key. But the 2nd, 3rd and 4th round ...
I am trying to test MD5 collisions presented in “[Collisions for Hash Functions MD4, MD5, HAVA](https://eprint.iacr.org/2004/199.pdf)” (PDF) by Xiaoyun Wang, Dengguo Feng, Xuejia Lai, Hongbo Yu; 2004. I wrote a PHP script to test it, but it doesn't produce the expected hash output. I tested everything several times ...
As far as I know in AES IGE each block depends on the previous one. In that case can it be parallelized. Is there some way to do it??
Can AES IGE be parallelized?
use letters to represent digits ------------------------------- "a captured German revealed under interrogation that Enigma operators had been instructed to encode numbers by spelling them out ... Alan Turing reviewed decrypted messages and determined that the number "eins" ("one") was the most common string in th...
In the Diffie-Hellman protocol for key exchange over an unsecured channel, we choose $p$ and $g$, where $g$ is a generator of $\mathbf{Z}_p^*$. However I want to know why this assumption makes the equation below true, assuming Alice and Bob choose $a$ and $b$ as secret keys: $$(g^b)^a \equiv (g^a)^b \bmod p.$$ In...
In the Diffie-Hellman protocol for key exchange over an unsecured channel, we choose $p$ and $g$, where $g$ is a generator of $\mathbf{Z}_p^*$. However I want to know why this assumption makes the equation below true, assuming Alice and Bob choose $a$ and $b$ as secret keys: $$(g^b)^a \equiv (g^a)^b \pmod p.$$ In...
It's seems to me that it is rather easy to create a symmetric encryption algorithm (though not necessarily a secure one). They're a dime a dozen. The number of asymmetric encryption algorithms probably could probably be counted using the fingers on one hand (all of the RSA-like algorithms, the ECC smorgasbord, McEliece...
What work goes into creating new asymmetric cryptosystems?
how to integrate 2-3 algorithms to encrypt large data fastly and securely insted using AES?
Why is it said that AES is unbreakable ? Brute force attacks would take years to crack it so is it possible to crack it if the computational speed of machines increase in the following decade ?
Why is the AES unbreakable?
I am trying to implement elliptic curve point addition in hardware for NIST p256 and p384 curves. I have noticed the following issue with the suggested NIST routines: Consider routine 2.2.7 of http://www.nsa.gov/ia/_files/nist-routines.pdf: Point addition $R = S + T$ is not valid for the case $S = T$ (this would be ...
As far as I know, in IGE mode (infinite garble extension) each block depends on the previous one. In that case, can the encryption be parallelized? Is there some way to do it?
Can IGE mode be parallelized?
I have an encrypted configuration file from an embedded device which I'm trying to decrypt. The file seems to be encrypted in 128bit blocks, as changing a single option causes a 16 byte block to change (all bytes change). The file appears to be encrypted in ECB mode, as blocks of all-zeroes are always encoded the same ...
> Can you help me understand what a cryptographic “salt” is? In the context of password creation, a "salt" is data (random or otherwise) added to a hash function in order to make the hashed output of a password harder to crack. > When might I need to use it? Always. > Why should or should I not use it? Y...
PKCS#11 is a standard for the software interface to cryptographic tokens (such as HSMs or Smart Cards), aiming at compatibility between implementations made by different token vendors. It also allows the same API to use various cryptographic mechanisms performing similar tasks by changing only a few values, mostly the ...
PKCS#11 is a standard for the software interface to cryptographic tokens (such as HSMs or Smart Cards), aiming at compatibility between implementations made by different token vendors. It also allows the same API to use various cryptographic mechanisms performing similar tasks by changing only a few values, mostly the ...
PKCS#11 is a standard for the software interface to cryptographic tokens (such as HSMs or Smart Cards), aiming at compatibility between implementations made by different token vendors. It also allows the same API to use various cryptographic mechanisms performing similar tasks by changing only a few values, mostly the ...
PKCS#11 is a standard for the software interface to cryptographic tokens (such as HSMs or Smart Cards), aiming at compatibility between implementations made by different token vendors. It also allows the same API to use various cryptographic mechanisms performing similar tasks by changing only a few values, mostly the ...
PKCS#11 is a standard for the software interface to cryptographic tokens (such as HSMs or Smart Cards), aiming at compatibility between implementations made by different token vendors. It also allows the same API to use various cryptographic mechanisms performing similar tasks by changing only a few values, mostly the ...
I'm planning to use the [`crypto_box()`][1] functions of [Nacl][2] (or, alternatively, the `crypto_box_easy()` functions of libsodium) to encrypt messages as part of a client/server protocol. The server has to deal with multiple clients and each message from a client to the server is encrypted using the public key of t...
PKCS#11 is a standard for the software interface to cryptographic tokens (such as HSMs or Smart Cards), aiming at compatibility between implementations made by different token vendors. It also allows the same API to use various cryptographic mechanisms performing similar tasks by changing only a few values, mostly the ...
PKCS#11 is a standard for the software interface to cryptographic tokens (such as HSMs or Smart Cards), aiming at compatibility between implementations made by different token vendors. It also allows the same API to use various cryptographic mechanisms performing similar tasks by changing only a few values, mostly the ...
PKCS#11 is a standard for the software interface to cryptographic tokens (such as HSMs or Smart Cards), aiming at compatibility between implementations made by different token vendors. It also allows the same API to use various cryptographic mechanisms performing similar tasks by changing only a few values, mostly the ...
TL;DR: they might not. PKCS#11 is a standard for the software interface to cryptographic tokens (such as HSMs or Smart Cards), aiming at compatibility between implementations made by different token vendors. It also allows the same API to use various cryptographic mechanisms performing similar tasks by changing only...
TL;DR: they might not. PKCS#11 is a standard for the software interface to cryptographic tokens (such as HSMs or Smart Cards), aiming at compatibility between implementations made by different token vendors. It also allows the same API to use various cryptographic mechanisms performing similar tasks by changing only...
I am encrypting some publicly known data, and some private data using the same key, using AES256 with CBC. An attacker does *not* have the ability to choose what the public data is. Is this safe? (It looks to be, according to: http://crypto.stackexchange.com/questions/1512/why-is-aes-resistant-to-known-plaintext...
I am encrypting some publicly known data, and some private data using the same key, using AES256 with CBC. An attacker does *not* have the ability to choose what the public data is. Is this safe? (It looks to be, according to: http://crypto.stackexchange.com/questions/1512/why-is-aes-resistant-to-known-plaintext...
I am encrypting some publicly known data, and some private data using the same key, using AES256 with CBC. An attacker does *not* have the ability to choose what the public data is. Is this safe? (It looks to be, according to: http://crypto.stackexchange.com/questions/1512/why-is-aes-resistant-to-known-plaintext...
Take a look at [this article][1] it explains the IV can be publicly known once you have encrypted your data. > Is using (and storing) a different iv for each file sufficient? (Am I > correct in thinking that I'd need to store the iv with the encrypted > data?) Yes, as a matter of fact i would not recommend usin...
We've all read how some people claim AES is broken because there was supposedly a way to get the plain text from a cipher text faster than brute force. but is this the definition? Is a cipher broken if you can get the key faster than bruteforce? or is there an other definition for broken? because if you have a 2^128...
When is a cipher broken?
We've all read how some people claim AES is broken because there was supposedly a way to get the plain text from a cipher text faster than brute-force. But is this the definition? Is a cipher broken if you can get the key faster than brute-force? Or is there another definition for "broken"? Because if you have a 128...
When is a cipher considered broken?
AES-128/192 safer than AES-256 in practice?
Why is it said that AES is unbreakable? Brute force attacks would take years to crack it, so is it possible to crack it if the computational speed of machines increase in the following decade?
Why is AES unbreakable?
After trying to invent my own AES mode, I decided to just implement something that's known to work, namely CTR with HMAC SHA256. 1. From what I understand, I can use the IV as a counter, and the IV only has to be unique for each key (generating unique IVs isn't a problem). Correct? 2. Is it a problem for HMAC SH...
> I decided to just implement something that's known to work, namely CTR with HMAC SHA256. So you are implementing your own mode after all? Don't. [Combining MAC and encryption](http://crypto.stackexchange.com/questions/202/should-we-mac-then-encrypt-or-encrypt-then-mac) is [actually tricky](http://crypto.stackexcha...
Your explanation is "broken in the academically sense" - there is a theoretical way to break the algorithm better than brute force. AES is broken in this way. There's also "broken in the practical sense", which means you can break an cipher in real applications or protocols. AES is still save in this sense, because you...
TL;DR: they might not. PKCS#11 is a standard for the software interface to cryptographic tokens (such as HSMs or Smart Cards), aiming at compatibility between implementations made by different token vendors. It also allows the same API to use various cryptographic mechanisms performing similar tasks by changing only...
> From what I understand, I can use the IV as a counter, and the IV only has to be unique for each key (generating unique IVs isn't a problem). Correct? Not exactly. The IV needs to be unique for each block per key. You can use a message counter for the Nonce component of the IV, then the block counter component is ...
After trying to invent my own AES mode, I decided to just implement something that's known to work, namely CTR with HMAC SHA256. 1. From what I understand, I can use the IV as a counter, and the IV only has to be unique for each key (generating unique IVs isn't a problem). Correct? 2. Is it a problem for HMAC SH...
TL;DR: they might not. PKCS#11 is a standard for the software interface to cryptographic tokens (such as HSMs or Smart Cards), aiming at compatibility between implementations made by different token vendors. It also allows the same API to use various cryptographic mechanisms performing similar tasks by changing only...
In the basic EL Gamal scheme, we encrypt a message m as (g^r, h^r m), where g is the group generator and h is the public key of the recipient. If the sender has another message m' to send to the recepient, can we use the same random r in the construction without decreasing the security of the scheme ?. In other...
In the basic EL Gamal scheme, we encrypt a message m as $(g^r, h^r m)$, where g is the group generator and h is the public key of the recipient. If the sender has another message $m'$ to send to the recepient, can we use the same random r in the construction without decreasing the security of the scheme ?. In o...
After trying to invent my own AES mode, I decided to just implement something that's known to work, namely CTR with HMAC SHA256. 1. From what I understand, I can use the IV as a counter, and the IV only has to be unique for each key (generating unique IVs isn't a problem). Correct? 2. Is it a problem for HMAC SH...
EFF - Electronic Frontier Foundation - built a [DES cracker][1] for a budget of 250K$ in July 1998. I assume that as of 2015 - the cost of such a DES breaker would be less, are there any estimations about how it would cost? Re-using their 1998 design. [1]: https://w2.eff.org/Privacy/Crypto/Crypto_misc/DESCracker...
what is the current actual budget - as of 2015 - needed to build a DES breaker machine?
I don't have much previous experience at all with cryptography, this is pretty much the first time I've tried anything similar. I'm trying to implement an extremely simple XOR encryption system in ComputerCraft for fun, here is the code: local function xorEncrypt(data, key) local klen = #key local...
In Public key Cryptography, when we aim to provide encryption and signature for our communication, can we use the same random number. For example when using el gamal encryption and DSA, can we use the same random $r$ for both ,without decreasing security ?
Re-using their design might be no good idea - there are cheaper designs for sure. This new DES cracker would just need to try every possible key - like the one of the EFF already did. DES was a big standard for encryption, so some people did build such machines, right? Of course did they: [COPACOBANA][1] is able to ...
Re-using their design might be no good idea - there are cheaper designs for sure. This new DES cracker would just need to try every possible key - like the one of the EFF already did. DES was a big standard for encryption, so some people did build such machines, right? Of course did they: [COPACOBANA][1] is able to ...
How to recover plaintext, if we know public key(RSA), correctly encrypted text and text encrypted with faulty public key, where one bit is changed?
In several public key algorithms, the person running the algorithm must generate a random number (that's separate from the key). Can this random number be the same for an encryption and a signature? For instance, if I'm encrypting a message with ElGamal and signing with DSA, can I use my random number from creating the...
Can the same random number be used in encryption and signing?
In the basic ElGamal encryption scheme, we encrypt a message $m$ as $(g^r, h^r m)$, where $g$ is the group generator and $h$ is the public key of the recipient. If the sender has another message $m'$ to send to the recipient, can they use the same random $r$ in the construction without decreasing the security of the...
Assume that a malicious user knows what string is being encrypted (a user_id, for example, which the user can know) and can also see the result of the encryption (the encrypted user_id that is used to authenticate them to another site.) If the user knows what is going into the encrypt function, as well as what is co...
Possible to determine the encryption key that was used by knowing the input and output of the encryption mechanism?
Is it $2^{-32}$ or $2^{-24}$ as one byte is assumed to take a given value and the remaining 3 bytes should have the same value?
What is the probability of finding 4 equal bytes?
In the case where I am self-signing my digital certificates, if I just change my certificate (generate a new one) every week or month, will this have (sort of similar to) the same effect as implementing Forward Secrecy, since I should have a new private key every time? Please correct me if I'm mistaken. Thanks.