instruction
stringlengths
15
30k
What exactly is a negligible (and non-negligible) function?
I have a question about RCON here is my illustration... this is the 128 bit key.. [2b] [28] [ab] [09] [7e] [ae] [f7] [cf] [15] [d2] [15] [4f] [16] [a6] [88] [3c] and then I will get this.. [09] [cf] [4f] [3c] and then I will put down the first 8bit(1byte) where...
Iam designing few cryptographic protocols and am new to it. Are there any well known tools that can be used to model/design these protocols ? And also verify/Analyze their validity ? If not a tool , is there any popular approach or formal method to design and analyze crypto protocols that are widely accepted ?
Are there any tools for modelling and analysis of Cryptographic protocols?
A Fully homomorphic encryption scheme needs to support an evaluate function that can do add and multiply operations on cipher text. Can we do all kinds of complex operations on cipher text like search, sort etc using just add and multiply ?
Can And and Multiply On Cipher Text achieve all operations?
A while ago, I came across the problem of trying to systematically reduce "RNG abuse" in the competitive battling environment of Pokémon (which, for anyone who's into this stuff, runs quite rampant) while developiong an engine for the game. For anyone who's not familiar, "RNG abuse" is tricking the pseudorandom number ...
A Fully homomorphic encryption scheme needs to support an evaluate function that can do add and multiply operations on cipher text. Can we do all kinds of complex operations on cipher text like search, sort etc using just add and multiply ?
Can Add and Multiply On Cipher Text achieve all operations?
Iam designing few cryptographic protocols and am new to it. Are there any well known tools that can be used to model/design these protocols ? And also verify/Analyze their validity ? If not a tool , is there any popular approach or formal method to design and analyze crypto protocols that are widely accepted ? ...
A while ago, I came across the problem of trying to systematically reduce "RNG abuse" in the competitive battling environment of Pokémon (which, for anyone who's into this stuff, runs quite rampant) while developiong an engine for the game. For anyone who's not familiar, "RNG abuse" is tricking the pseudorandom number ...
I am working on a [library][1] to encrypt and decrypt data, given a password. The encrypted data includes a header with version information and an HMAC (the header is included in the HMAC). I am worried about exactly how I should check/use HMAC and version: In a future release (with a new version number), the ...
I am working on a [library][1] to encrypt and decrypt data, given a password. The encrypted data includes a header with version information and an HMAC (the header is included in the HMAC). I am worried about exactly how I should check/use HMAC and version: In a future release (with a new version number), the ...
I am working on a [library][1] (using standard primitives AES256 CTR, HMAC with SHA256, PBKDF2 with SHA256, 128 bit salt, and 10000 rounds) to encrypt and decrypt data, given a password. The encrypted data includes a header with version information and an HMAC (the header is included in the HMAC). I am worried a...
I am working on a [library][1] (using standard primitives: AES256 CTR; HMAC with SHA256; PBKDF2 with SHA256, 128 bit salt, and 10000 rounds) to encrypt and decrypt data, given a password. The encrypted data includes a header with version information and an HMAC (the header is included in the HMAC). I am worried a...
(I am not a crypto expert, so I apologize if the terminology I use is incorrect.) Suppose I have the following simple broadcast encryption scheme for securely sending content to $n$ authorized recipients using only symmetric-key algorithms: 1. each authorized recipient is given a recipient key (known only to the...
efficient authentication with broadcast encryption?
You could have "protocol ID's" which describe the set of primitives and parameters each library version is capable of using. You may deprecate older ID's once they become obsolete by just removing them from some future version, this way you can reject files which are deemed too old (or too recent) and thus unsupported,...
I am working on a [library][1] (using standard primitives: AES256 CTR; HMAC with SHA256; PBKDF2 with SHA256, 128 bit salt, and 10000 rounds) to encrypt and decrypt data, given a password. The encrypted data includes a header with version information and an HMAC (the header is included in the HMAC). I am worried a...
The answer to your question is yes this is possible, but if we don't use assymetric cryptography, we need an alternate source of assymetry. One option is using time-delayed schemes. In such schemes, they key for the MAC is not initially disclosed, but only after some time interval. See [here](http://repository.cmu...
The answer to your question is yes this is possible, but if we don't use assymetric cryptography, we need an alternate source of assymetry. One option is using time-delayed schemes. In such schemes, the key for the MAC is not initially disclosed, but only after some time interval. See [here](http://repository.cmu.e...
Let G(x) be a pseudo-random generator such that: $G(x)$ = $f_x$($0^k$)$f_x$($1^k$) where k=$|x|$ . I don't understand the meaning of $1^n$ , $0^n$ and the differences between them within that context. What do they represent?
EDIT : I added more context. Let $f$ = {$f_k$} be a pseudo random function family. Let $G(x)$ be a pseudo-random generator such that: $G(x)$ = $f_x$($0^k$)$f_x$($1^k$) where k=$|x|$ . I don't understand the meaning of $1^n$ , $0^n$ and the differences between them within that context. What do they represe...
EDIT : I added more context. Let $f$ = {$f_k$} be a pseudo random function family. Let $G(x)$ be a pseudo-random generator such that: $G(x)$ = $f_x$($0^k$)$f_x$($1^k$) where k=$|x|$ . I don't understand the meaning of $1^n$ , $0^n$ and the differences between them within that context. What do they represe...
What do $0^n$ and $1^n$ mean in cryptography?
While reading Attribute Based Encryption Schemes, I did not quite understand what a monotonic access structure or non monotonic access structures are. Is there a popular explanation of those terms ? any references ?
What are monotonic and non monotonic access structures in ABE ?
The Linux kernel supports symmetric and asymmetric hash functions. E.g. sha1, sha256, ... I know what the difference is between symmetric and asymmetric ciphers, where the encryption and decryption key is not the same. **Question** What is the difference between symmetric and asymmetric hash functions?
Difference between symmetric and asymmetric hash function?
The Linux kernel supports symmetric and asymmetric hash functions. E.g. sha1, sha256, ... See [tcrypt.c][1] and search for `test_hash_speed` and `test_ahash_speed`. I know what the difference is between symmetric and asymmetric ciphers, where the encryption and decryption key is not the same. **Question** W...
I know that a simple monoalphabetic substitution cipher is considered extremely weak, on account of linguistic frequency-analysis attacks. However, assume the following: - cleartext is encrypted (with 256-bit AES, for example), and the resulting cipher is in base64 format - the client has a key of 64 chars (a-z,...
It is probably not the case of your example, but in some sense "asymmetric hash functions" do exists: they are called trapdoor hash functions (or also chameleon hash functions). Very briefly, they are collision resistant only if you don't know their trapdoor secret key. Such functions take 2 arguments (instead of ...
Is there any library/tool available which can allow me to search over encrypted data? I would like to encrypt data on client side, send it to cloud and perform search in cloud. I've been reading about homomorphic encryption and though there is CryptDb available which makes it possible to run encrypted DB in cloud...
I saw a sample code where the password is salted (using PKBDF2) at each encryption. That means that the salt must be stored for each encrypted message. I don't understand why they do that since AES is used here in CBC mode with a random IV at each encryption, so a same plaintext will not produce the same ciphertext....
Should I salt an AES password at each encryption?
I saw a sample code where the **same** password is salted with a different value (using PKBDF2) for each encryption. That means that the salt must be stored for each encrypted message. I don't understand why they do that since AES is used here in CBC mode with a random IV at each encryption, so a same plaintext will...
I have a string "abcd pqrs". This is digitally signed with a x509 certificate(with it's private key) and it produces a signature. From the signed string - is it possible to find out - What hashing algorithm was used? Also does the signed data always contain the certificate or the public key used to sign the dat...
I have a string "abcd pqrs". This string is digitally signed with an X.509 certificate (with its private key) and it produces a signature. From the signed string, is it possible to find out what hashing algorithm was used? Also, does the signed data always contain the certificate or the public key used to sign t...
$0^n$ means a string of $n$ zeros (the $n$-bit string that is all zeros). $1^n$ means a string of $n$ ones. Why were these used? There's nothing special about $0^n$ or $1^n$, in this context. They could have used any pair of two constant $n$-bit strings, as long as the two strings were not the same. $0^n$ and $1...
I've been struggling on this problem for a while now : the Hill cipher is well-known to be vulnerable to known-plaintext attack due to its linearity. Given a key matrix $K$ of size $n\times n$, one can retrieve the key with as little as $n^2$ plaintext/cipher text couples. All examples found on the Internet assume a...
I saw a sample code where the **same** password is salted with a different value (using [PBKDF2](http://en.wikipedia.org/wiki/PBKDF2)) for each encryption. That means that the salt must be stored for each encrypted message. I don't understand why they do that since AES is used here in CBC mode with a random IV at ea...
I would like someone to explain me how to generate DES subkeys, because in the documentation that I saw, [sometimes][1] they say: > "We rotate the initial key according to the number of iterations given by this sequence: 1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28." and [sometimes][2] they say: ...
DES key expansion: why are these two descriptions different?
I'm taking a course in cryptography, and I would value any comments. This is not too technical a question, but more about directions or strategy in cryptography. My question is, is public key cryptography, for instance, "just" a question of the difficulty of dealing with large integers? I can understand that factoring ...
What's the strategy for future directions in cryptography? Bigger numbers/faster searching, or new methods, say, of factoring?
Common Criteria classifies the requirements for true Random Number Generators, and specifies how these should be tested against failures (these can occur accidentally, or following deliberate attack, e.g. by very low temperature). The relevant [Application note and Interpretation of the Scheme][1] is [AIS 31 version 2....
Odds of false error detection in a true RNG test?
I'm taking a course in cryptography, and I would value any comments. This is not too technical a question, but more about directions or strategy in cryptography. My question is, is public key cryptography, for instance, "just" a question of the difficulty of dealing with large integers? I can understand that factoring ...
Odds of false error detection in a randomness test using the chi-squared test?
It is hard to tell from this question, but I suspect that you may have managed to confuse yourself about what problem you have: i.e., that you've gotten caught up in a particular mechanism, and would benefit from taking a moment to step back and look at the actual requirements. I found it hard to extract the actual re...
Common Criteria classifies the requirements for true Random Number Generators, and specifies how these should be tested against failures (these can occur accidentally, or following deliberate attack, e.g. by very low temperature). The relevant [Application note and Interpretation of the Scheme][1] is [AIS 31 version 2....
Common Criteria classifies the requirements for true Random Number Generators, and specifies how these should be tested against failures (these can occur accidentally, or following deliberate attack, e.g. by very low temperature). The relevant [Application note and Interpretation of the Scheme][1] is [AIS 31 version 2....
Common Criteria classifies the requirements for true Random Number Generators, and specifies how these should be tested against failures (these can occur accidentally, or following deliberate attack, e.g. by very low temperature). The relevant [Application note and Interpretation of the Scheme][1] is [AIS 31 version 2....
Is there a known pair of distinct bit strings (A,B) such that SHA1(A) == SHA1(B)? If the answer is no than how can SHA1 be considered broken?
When given p = 5, q = 11, N = 55 and e = 17, I'm trying to compute the private key d. I can calculate phi(N) = 40, but my lecturer then says to use the extended Euclidean algorithm to compute d. That's where I get stuck. Here's my work so far: First I use the euclid algorithm to calculate : 40 = 2(17) + 6 ...
in asymmetric ciphers we publish the public key for anyone which means attacker can encrypt desired message and compare ciphertext and plaintext without communication with bob , so is that make sense for asymmetric ciphers or Known-plaintext attack is only for symmetric ciphers ? ps: what's all attacks tree exist fo...
do we have Known-plaintext attack for PKI?
In asymmetric ciphers we publish the public key for anyone, which means an attacker can encrypt any message they want and compare the ciphertext and plaintext without communicating with the owner of the private key. So do known-plaintext attacks make sense for asymmetric ciphers, or are they only for symmetric ciphers?...
Do known-plaintext attacks exist for public key encryption?
I've been told that asymmetric cryptography requires that the message to be encrypted be smaller than its key length. Why is this? I know about hybrid encryption, which [uses symmetric encryption to resolve this problem](http://stackoverflow.com/questions/3491481/encrypting-large-files-using-a-public-key). But I s...
is the elliptic curve (EC) cryptosystem outperforms RSA and DL cryptosystems?
I am using HMAC (hmac-sha256 to be precise) message authentication without encryption. My question is, is having a short message make it easy to determine what my secret key is? My C# code is as follows HMACSHA256 hmacSha256 = new HMACSHA256(new byte[]{0xfa, 0x35, 0x24, ..., 0x5e}); // 64 byte secret key ...
I have read up on rainbow tables and think I understand the idea behind them. However, I find that it would be better for me to actually attempt to implement a (very basic) rainbow table generator in order to get a proper feel to using rainbow tables. However, I face the problem of there not being descriptions on ho...
I have read up on rainbow tables and think I understand the idea behind them. However, I find that it would be better for me to actually attempt to implement a (very basic) rainbow table generator in order to get a proper feel to using rainbow tables. However, I face the problem of there not being descriptions on ho...
Throughout the literature, it is stated that EC cryptosystems outperform RSA and Discrete logarithm cryptosystems, but I cannot understand how ECC would be more efficient than RSA and DL in terms of computation and storage. Is there any pragmatic performance analysis comparing these cryptosystems so that I can unde...
Does the elliptic curve (EC) cryptosystem outperform RSA and DL cryptosystems?
we know Grover algoritm speed up cracking symmetric keys 2x faster than classical brute force attacks which means we have to use at least a 256 bit key , but i herd somewhere it also effect on 128 bit blocks too and we have to use 256 bit blocks ! is that true ? but AES 256 bit block [is not secure][1] [1]: htt...
Does quantum algoritms effect protocol size or only key size?
Length-extension allows to append any data to the message while not knowing the secret. Any length-extension explaination one the web considers the situation when the secret is prefixed to the data, but is this attack applicable to the situations when the secret is appended to the data?
Will length-extension work if secret is not prefixed but appended to the data?
We know that Grover's algorithm can speed up cracking symmetric keys. Basically the key space is halved. This means we have to use at least a 256 bit key (to get 128 bit security). I heard somewhere it also has an effect on the block size (we should use 256 bit blocks instead of 128)! Is that true?
Does Grover's algorithm effect protocol size or only key size?
We know that Grover's algorithm can speed up cracking symmetric keys. Basically the key space is halved. This means we have to use at least a 256 bit key (to get 128 bit security). I heard somewhere it also has an effect on the block size (so we should use 256 bit blocks instead of 128)! Is that true?
Does Grover's algorithm effect block size or only key size?
> **Possible Duplicate:** > [Why is h(m||k) insecure?](http://crypto.stackexchange.com/questions/5725/why-is-hmk-insecure) <!-- End of automatically inserted text --> Length-extension allows to append any data to the message while not knowing the secret. Any length-extension explaination one the web considers the...
What properties should an ideal straight P-Box exhibit?
A while ago, I came across the problem of trying to systematically reduce "RNG abuse" in the competitive battling environment of Pokémon (which, for anyone who's into this stuff, runs quite rampant) while developiong an engine for the game. For anyone who's not familiar, "RNG abuse" is tricking the pseudorandom number ...
Here is one simple solution. After a new user installs the Pokemon software, before the new user can use that software (for tournament-eligible activities), they must register it with a central tournament server. The tournament server gives the user's software a random 128-bit seed $S$, and remembers this seed. Th...
A while ago, I came across the problem of trying to systematically reduce "RNG abuse" in the competitive battling environment of Pokémon (which, for anyone who's into this stuff, runs quite rampant) while developiong an engine for the game. For anyone who's not familiar, "RNG abuse" is tricking the pseudorandom number ...
Obviously, much of cryptography requires the assumption that adversaries have bounded computing power. So, I was wondering, are there any fields in cryptographic research for which high power computing would aid researchers? Obviously, even the most advanced computers today will not give them an asymptotic advantag...
Sponge hashes like Keccak(SHA-3) and CubeHash, xor a message block into part of the internal state. Why use a reversible operation like xor for that, instead of replacing that part of the state with the message block? 1. It clearly has no effect on pre-image and collision resistance. It's trivial to transform collis...
Why xor the message into the state for sponge hashes?
Sponge hashes like Keccak(SHA-3) and CubeHash, xor a message block into part of the internal state. Why use a reversible operation like xor for that, instead of replacing that part of the state with the message block? 1. It clearly has no effect on pre-image and collision resistance. It's trivial to transform collis...
Let $E_k$ : {0,1}$^l$ be a block cipher encryption function with block-size $l$ and key-length $n$. In class, we saw that a double encryption with two independent keys $E{}'_{k_1k_2}(x)$ = $E_{k_1}(E_{k_2}(x))$, can be brute-forced in $O(2n)$ time and $O((l + n)2^n)$ space using the meet-in-the-middle attack: ...
Let $E_k$ : {0,1}$^l$ be a block cipher encryption function with block-size $l$ and key-length $n$. In class, we saw that a double encryption with two independent keys $E{}'_{k_1k_2}(x)$ = $E_{k_1}(E_{k_2}(x))$, can be brute-forced in $O(2^n)$ time and $O((l + n)2^n)$ space using the meet-in-the-middle attack: ...
Let $E_k$ : {0,1}$^l$ be a block cipher encryption function with block-size $l$ and key-length $n$. In class, we saw that a double encryption with two independent keys $E{}'_{k_1k_2}(x)$ = $E_{k_1}(E_{k_2}(x))$, can be brute-forced in $O(2^n)$ time and $O((l + n)2^n)$ space using the meet-in-the-middle attack: ...
I'm looking for a simple way to perform homomorphic crypto on 32-bit integers. My only requirement is that I can add and subtract from the plaintext value without actually decrypting it. The crypto need not be particularly strong - the implementation is designed to be a deterrent rather than something more concrete. ...
Sponge hashes like Keccak(SHA-3) and CubeHash, xor a message block into part of the internal state. Why use a reversible operation like xor for that, instead of replacing that part of the state with the message block? 1. It clearly has no effect on pre-image and collision resistance. It's trivial to transform collis...
I have noticed that some programs used for cryptography will tell you if an entered key is wrong when you try to decrypt. It seems (to me at least) that this would mean that the key somehow is written into the encrypted file. And the algorithms that I know of will produce an output even if the key is wrong. 1. How ...
It's not a security problem but a necessary feature. It's not an exact science to distinguish a "good decryption" from a "bad decryption". What if the user had encrypted random data? you would not be able to figure out if the key is correct or not from that sole information, since in both cases the decrypted output wou...
I made a cool 5 word passphrase back then using the old [Diceware method][1] and use it as a master password. The question is as computing power increases will we need to add more and more words to our passphrases which we will eventually forget? I'm in my mid 30s, will passphrases be enough in my lifetime? :) So back ...
Ideal passphrase length: old diceware method (5 words) vs. your Bitcoin wallet.dat passphrase lenght (8 words) and doubling passwords?
Is there a reason, why in pre-shared key mode, Wi-Fi session key is not secured with something like Diffie-Hellman but instead is derived from PSK key and some information exchanged in clear during sign-on?
Why WPA-PSK do not uses Diffie-Hellman key exchange?
> I made a cool 5 word passphrase back then using the old Diceware > method and use it as a master password. The question is as computing > power increases will we need to add more and more words to our > passphrases which we will eventually forget? I'm in my mid 30s, will > passphrases be enough in my lifetime? :)...
> I made a cool 5 word passphrase back then using the old Diceware > method and use it as a master password. The question is as computing > power increases will we need to add more and more words to our > passphrases which we will eventually forget? I'm in my mid 30s, will > passphrases be enough in my lifetime? :)...
I am currently looking at the security of cryto USB drives for storing x509 certificates. I have one in possession currently. It can be read/written to using the Microsoft Crypto APIs. Anytime one reads/writes to/from the device it prompts for a PIN. The PIN can be changed using a UI which installs with the device. ...
Crypto USB Devices - where is the PIN/Password stored?
I am currently looking at the security of cryto USB drives for storing x509 certificates. I have one in possession currently. It can be read/written to using the Microsoft Crypto APIs. Anytime one reads/writes to/from the device it prompts for a PIN. The PIN can be changed using a UI which installs with the device. ...
Let $E_k$ : {0,1}$^l$ be a block cipher encryption function with block-size $l$ and key-length $n$. In class, we saw that a double encryption with two independent keys $E{}'_{k_1k_2}(x)$ = $E_{k_1}(E_{k_2}(x))$, can be brute-forced in $O(2^n)$ time and $O((l + n)2^n)$ space using the meet-in-the-middle attack: ...