instruction
stringlengths
15
30k
If you use a deterministic public key encryption scheme like [textbook RSA](http://en.wikipedia.org/wiki/RSA_%28algorithm%29#Operation), i.e., without randomized padding, then **yes**. If you use a *secure* public key encryption scheme such as [RSA OAEP](http://en.wikipedia.org/wiki/Optimal_asymmetric_encryption_pad...
If you use a deterministic public key encryption scheme like [textbook RSA](http://en.wikipedia.org/wiki/RSA_%28algorithm%29#Operation), i.e., without randomized padding, then **yes**. If you use a *secure* public key encryption scheme such as [RSA OAEP](http://en.wikipedia.org/wiki/Optimal_asymmetric_encryption_pad...
The short answer is **NO**: you will not obtain identical ciphertexts from the same files encrypted using two different runs of a **decent public key file-encryption software**; their hash will not coincide. **The longer answer (in theory):** If you use a deterministic public key encryption scheme like [textbook ...
The short answer is **NO**: you will not obtain identical ciphertexts from the same files encrypted using two different runs of a **decent public key file-encryption software**; their hash will not coincide. **The longer answer (in theory):** If you use a deterministic public key encryption scheme like [textbook ...
The short answer is **NO**: you will not obtain identical ciphertexts from the same file encrypted using two different runs of a **decent public key file-encryption software**; their hash will not coincide. **The longer answer (in theory):** If you use a deterministic public key encryption scheme like [textbook R...
how we can summarize SHA-256 into shorter values when we for example can't handle more than 128 bits on system? its better just use first 128bit and ignore the rest of bits or split full value and XOR them? or use another hash function that produce required bit long hashes to generate a hash from SHA-256's value (e.g S...
The short answer is **NO**: you will not obtain identical ciphertexts from the same file encrypted using two different runs of a **decent public key file-encryption software**; their hash will not coincide. **The longer answer (in theory):** If you use a deterministic public key encryption scheme like [textbook R...
To add some more perspective to this: this question has been studied quite extensively in the context of hash function combiners. A combiner is simply a function that gets (black-box) access to two hash functions and implements a new hash function. The question there is: does a combiner with "short output" exist that i...
I'm on a crypto app using OpenSSL (I'm more an implementer/cryptographer than a cryptologist), mainly as a hobby, for now. My app will be able to encrypt a file (not a container) with symmetric or asymmetric or both encryption (sym then asym), and I want to implement "plausible deniability" (I'm in France, you shoul...
I'm on a crypto app using OpenSSL (I'm more an implementer/cryptographer than a cryptologist), mainly as a hobby, for now. My app will be able to encrypt a file (not a container) with symmetric or asymmetric or both encryption (sym then asym), and I want to implement "plausible deniability" (I'm in France, you shoul...
My understanding of ECDSA signature length is that it depends on the key size. So for instance, if a "prime256v1" is used, the signature length will be 64 because (n/8)*2 and for "secp384r1" it will be 96. However, I don't understand why is it for "secp521r1" the signature length is 132 instead of 130?
Of course, since the domain of a hash function is infinite and its range is finite, it cannot possibly be injective, i.e. there is at least one hash with more than one string that is being mapped to it. This is called the [pigeonhole argument](http://en.wikipedia.org/wiki/Pigeonhole_principle): if the domain of a fun...
In a hash function you map an input of arbitrary length against an input of finite length such that the relationship me one-to-one(or at least thats what you are trying to achieve). Hence, isn't it impossible to have a perfect hashing algorithm? Aren't md5, sha-*, all flawed in this respect? Is an "ideal hash" im...
are ideal hashes possible to create?
In a hash function, you map an input of arbitrary length to an output of finite length such that the relationship is one-to-one (or at least that's what you are trying to achieve). Hence, isn't it impossible to have a perfect hashing algorithm? Aren't md5, sha-*, all flawed in this respect? Is an "ideal hash" imp...
I'm on a crypto app using OpenSSL (I'm more an implementer/cryptographer than a cryptologist), mainly as a hobby, for now. My app will be able to encrypt a file (not a container) with symmetric or asymmetric or both encryption (sym then asym), and I want to implement "[deniable encryption][1]" (I'm in France, you sh...
I'm on a crypto app using OpenSSL (I'm more an implementer/cryptographer than a cryptologist), mainly as a hobby, for now. My app will be able to encrypt a file (not a container) with symmetric or asymmetric or both encryption (sym then asym), and I want to implement "[deniable encryption][1]" (I'm in France, you sh...
Forgive me if this seems like a very obvious question or if I used terminology incorrectly, I am no crypto expert. I currently have a system with has two keys sourced from a single key subjected to `HKDF`. One key is used for a `Salsa20` stream cipher and the other is used for a `SHA-2` based HMAC. Given that a s...
I currently have a system which uses two keys sourced from a single key subjected to `HKDF`. One key is used in the `Salsa20` stream cipher and the other is used for a `SHA-2` based HMAC. Given that the stream cipher (Salsa20) is being used for a persistent stream lasting a long time (perhaps hours) with frequent da...
When do I need to renew keys for Salsa20 or HMAC?
Can anyone tell me the name of this cipher please? I know it's a simple substitution cipher, I just don't know the name of it. Cipher Key: help Cipher alphabet: a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z h|e|l|p|a|b|c|d|f|g|i|j|k|m|n|o|q|r|s|t|u|v|w|x|y|z Text: this is a t...
Can anyone tell me the name of this cipher please?
I’m doing a school assignment about secure communications between a Server and a Client. Basically, messages are exchanged between the clients and the server and these communications must implement confidentiality, authentication, integrity and non-repudiation. Imagine I have to send a message from the client to th...
Can anyone tell me the name of this cipher please? I know it's a simple substitution cipher, I just don't know the name of it. Cipher Key: help Cipher alphabet: a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z h|e|l|p|a|b|c|d|f|g|i|j|k|m|n|o|q|r|s|t|u|v|w|x|y|z Text: this is a t...
Does anyone knows any public repository of steganography generated images?, I mean that appears the cover and stego file generated by different types of software. I need that because I want to test a steganalysis technique. Thanks
steganography image repository or databank?
I’m doing a school assignment about secure communications between a Server and a Client. Basically, messages are exchanged between the clients and the server and these communications must implement confidentiality, authentication, integrity and non-repudiation. Imagine I have to send a message from the client to th...
Can anyone tell me the name of this cipher please? I know it's a simple substitution cipher, I just don't know the name of it. Cipher Key: help Cipher alphabet: a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z h|e|l|p|a|b|c|d|f|g|i|j|k|m|n|o|q|r|s|t|u|v|w|x|y|z Text: this is a t...
Can anyone tell me the name of this cipher please? I know it's a simple substitution cipher, I just don't know the name of it. Cipher Key: help Cipher alphabet: a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z h|e|l|p|a|b|c|d|f|g|i|j|k|m|n|o|q|r|s|t|u|v|w|x|y|z Text: this is a t...
I'm trying to calculate how many possible combinations of files there can be using a signed 64-bit file length, but can't seem to find a formula (or I'm using the wrong keywords). For example, the number of unique files that have a length of 256 bytes is $2^{256*8}$ = $2^{2048}$. I assume the total number of combinatio...
How many possible input files are there who's length can be stored in 63-bits?
To add some more perspective to this: this question has been studied quite extensively in the context of hash function combiners. A combiner is simply a function that gets (black-box) access to two hash functions and implements a new hash function. The question there is: does a combiner with "short output" exist that i...
To add some more perspective to this: this question has been studied quite extensively in the context of hash function combiners. A combiner is simply a function that gets (black-box) access to two hash functions and implements a new hash function. The question there is: does a combiner with "short output" exist that i...
Does anyone knows any public repository of steganography generated images?, I mean that appears the cover and stego-file generated by different types of software. I need that because I want to test a steganalysis technique.
I’m doing a school assignment about secure communications between a Server and a Client. Basically, messages are exchanged between the clients and the server and these communications must implement confidentiality, authentication, integrity and non-repudiation. Imagine I have to send a message from the client to th...
Can anyone tell me the name of this cipher please? I know it's a simple substitution cipher, I just don't know the name of it. Cipher Key: help Cipher alphabet: a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z h|e|l|p|a|b|c|d|f|g|i|j|k|m|n|o|q|r|s|t|u|v|w|x|y|z Text: this is a t...
AES in CBC-MAC mode is proven to be good PRF . But is there any study done on other modes ? how good is ECB mode as PRF ?
What is the impact of different modes on pseudo randomness of AES?
I'm on a crypto app using OpenSSL (I'm more an implementer/cryptographer than a cryptologist), mainly as a hobby, for now. My app will be able to encrypt a file (not a container) with symmetric or asymmetric or both encryption (sym then asym), and I want to implement "[deniable encryption][1]" (I'm in France, you sh...
I'm on a crypto app using OpenSSL (I'm more an implementer/cryptographer than a cryptologist), mainly as a hobby, for now. My app will be able to encrypt a file (not a container) with symmetric or asymmetric or both encryption (sym then asym), and I want to implement "[deniable encryption][1]" (I'm in France, you sh...
I'm developing a new image steganalysis technique, and I'd like to test how effective it is in practice. How could I do this? Are there such things as standard "test vectors" for steganalysis?
I'm new in the crypto world and I've just discovered `PBKDF` (I used to use typed passeword as symmetric key). When using some crypto mode, you're required to generate an `IV` which must be completely random and not predictable, the best length is the length of a block size. `PBKDF` (and hashing functions in general...
Are IVs and salts the same and usable for each other uses?
Suppose I use GnuPG to symmetrically encrypt a file like so: gpg --no-options -c --cipher-algo AES256 --no-random-seed-file -o my.out my.file I then provide a passphrase when prompted. * What steps does the software actually take to get from the passphrase I provide as a user, to the actual 256-bit AES key...
What is the GnuPG process for going from a passphrase to a symmetric key?
I'm trying to study a simplified TLS-style protocol, including verifying RSA signatures. It's an attempt to verify using only a valid certificate. However, I can't manage to get anything to verify properly. I have a modulus, exponent, signature, and hash of the message. With the following parameters: >modulus = 2845...
I was asked to implement traffic encryption between the game server and clients. Currently, the traffic is not encrypted in any way, which lets players use cheats to listen to the traffic in order to obtain information about the location of the opponents. Traffic packets are small (50-70 bytes) and the developers a...
I am new to linear cryptanalysis, so I decided to try to break a toy cipher that was designed to be vulnerable to linear cryptanalysis. Unfortunately, I can't get it to work no matter how hard I try. I've read the Wikipedia article and several papers, but they always seem vague on how to turn equations that hold over t...
> We think that the player will not be able to get this key by extracting it from the memory or somehow else. Forgive me, but I'm skeptical. If you really have figured out a way to do this --- and plenty of well-funded, intelligent people have tried and failed --- I'd recommend slapping a patent on it and making mil...
Attack against modular inversion operation using side-channels?
Recently i'm reading a [paper][1] . In the section 2 `2.1 Basic Denitions and Properties` , property 1 says that $$2n<LS_s\leq2^n-2$$ The author claims that this bound comes from "[Characterizations of Generators for Modified de Bruijn Sequences][2]". I go through it, but i never find this bound in it. I wonder ho...
In most of time, what I see is explicit signatures such as ElGamal, it's rare to see the implicit signatures. So I wonder 1. why it's rare to be seen? 2. what aspect is it mainly used? 3. what's the difference between implicit signature and explicit signature? P.S. I want a detailed answer, better gi...
I'm using OpenSSL 0.9.8 on OSX Maverick, and I want to use a PBKDF but I can't find any doc/man about it on OpenSSL's website. I'm working on QCA, an OpenSSL wrapper for Qt, and when I arrived there was `PKCS5_PBKDF2_HMAC_SHA1` as PBKDF2, a function I can’t find either on the OpenSSL website. It's marked as DEPRECAT...
Typically ad hoc networks do not have a proper infrastructure and the routing is done only through the base stations which are connecting a wired and wireless network. Does quantum cryptography protocols and QKD provide a better security for such ad hoc networks.?
What kind of Quantum cryptography technology(protocols) can be used for Mobile Ad hoc networks(MANETS)?
I've seen a few puzzles based on a type of cipher in which letters in the plaintext are substituted with groups of characters in the ciphertext. The ciphertext only uses a handful of unique characters. For example: a -> 154 b -> 53 c -> 12 d -> 41 e -> 153 ... In this example, `bead...
Is there a general method to crack this type of fractionating cipher?
Why are security against eavesdropping and security against CPA equivalent in the setting of public-key cryptography?
Why are security against eavesdropping and security against CPA equivalent in the setting of public-key cryptography?
[QKD](http://en.wikipedia.org/wiki/Quantum_key_distribution) aims at exchanging key material to be used with encryption based on [OTPs](http://en.wikipedia.org/wiki/One-time_pad) between two parties and thus to achieve perfect secrecy for transmitted messages. There are, however, several drawbacks for practical use...
Recently i'm reading ["Cryptographically Strong de Bruijn Sequences with Large Periods"][1] . In the section 2 `2.1 Basic Denitions and Properties` , property 1 says that $$2n<LS_s\leq2^n-2$$ The author claims that this bound comes from "[Characterizations of Generators for Modified de Bruijn Sequences][2]". I go thro...
I'm currently working on web services which allows to send and retrieve data. The data belong to a team. A team is composed of users. Each authenticated user can send and retrieve data to/from their team. I need to add encryption to this with the following requirements: - Data are encrypted on the server a...
Because the time that the Extended Euclidean algorithm depends on the inputs (and, in particular, is a complex function of the two, depending on the ratio expressed as a continguous fraction), there may be some leakage there. It occurs to me, however, that there is a very simple countermeasure; assuming that the sec...
Because the time that the Extended Euclidean algorithm depends on the inputs (and, in particular, is a complex function of the two, depending on the ratio expressed as a continguous fraction), there may be some leakage there. It occurs to me, however, that there is a very simple countermeasure; assuming that the sec...
I have been working on a Bloom Filter implementation recently and after a discussion with a co-worker about how many hashing functions to use I told him I was limited with using hashing functions that are already implemented and didn't want to risk the loss of distribution if I derive hashing functions from them. We...
Attack scenario: SSD physically retrieved from a computer that is turned off. The entire disk is encrypted with AES 256-bit (GNU/Linux, LUKS). The SSD has had TRIM enabled for several years and the file system has seen a lot of use, i.e. a lot of files deleted over time (triggering TRIM). Assume that the key used is...
For this cipher, I suggest finding all possible linear approximations by simply enumerating them. If $S$ is the S-box, the bias of the linear approximation $\alpha \cdot x = \beta \cdot S(x)$ is given by $$b(\alpha,\beta) = |2 \Pr[\alpha \cdot x = \beta \cdot S(x)] - 1|.$$ Notice that you can compute $b(\alpha,\...
For this cipher, I suggest finding all possible linear approximations by simply enumerating them. If $S$ is the S-box, the bias of the linear approximation $\alpha \cdot x = \beta \cdot S(x)$ is given by $$b(\alpha,\beta) = |2 \Pr[\alpha \cdot x = \beta \cdot S(x)] - 1|.$$ Notice that you can compute $b(\alpha,\...
In learning how DH works for cryptography applications, I'm coming across some confusing language. For starters, most of the time DH is discussed in the context of "generating" their shared secret. However, I'm also seeing that it can be used for encryption purposes as well (such as encrypting the shared secret using a...
In pairing , G1*G2 -->Gt , Why we are mapping element from group G1 and group G2 to have element in Gt. How it is used in cryptography.? What is the advantages of using pairing in cryptography?
Is a one-time pad still breakable on a depth of 2+ *if the plaintext is completely random*? I'm assuming this idea is wrong, mostly because it occurred to me, but let me walk you through my logic so you can concisely correct me: - A one-time pad is unbreakable on a depth of 1 because a comprehensive brute-fo...
Is a one-time pad still breakable on a depth of 2+ *if the plaintext is completely random*? I'm assuming this idea is wrong, mostly because it occurred to me, but let me walk you through my logic so you can concisely correct me: - A one-time pad is unbreakable on a depth of 1 because a comprehensive brute-fo...
Consider the pairing $e: G_1*G_2 \to G_t$. Why we are mapping element from group $G_1$ and group $G_2$ to an element in $G_t$. How are they used in cryptography? What advantages do they provide?
Given the following preconditions: A plaintext A (~512bit length), that is hashed by using SHA-1 and truncated to (the first) 64 bits. I know both, the plaintext and the truncated hash, and want to perform a Second Preimage Collision Attack. Furthermore, a part of the new plaintext B, that should produce the s...
Given the following preconditions: - A plaintext A (~512bit length), that is hashed by using SHA-1 and truncated to (the first) 64 bits. - I know both, the plaintext and the truncated hash, and want to perform a Second Preimage Collision Attack. - Furthermore, a part of the new plaintext B, that should produ...
[QKD](http://en.wikipedia.org/wiki/Quantum_key_distribution) aims at exchanging key material to be used with encryption based on [OTPs](http://en.wikipedia.org/wiki/One-time_pad) between two parties and thus to achieve perfect secrecy for transmitted messages. There are, however, several drawbacks for practical use...
**The scheme as you describe it in itself may be secure in some (especially) theoretical environment.** However, I don't suggest to use it, because any attempt to use of values passed between the peers can possibly undermine the security of the scheme as can e.g. insecure RNGs. I have expressed a few concerns below...
Im tryng to understand if now days using AES is secure or not, after reading some arguments on [this page][1] it seems like not: > Now as the NSA GCHQ et al know very well the more efficient you make > the implementaiton of crypto code the more side channels it has unless > extream caution is observed. One thing w...
Is AES still secure considering all this NSA/Snowden scandal?
For the purposes of a bloom filter you need a number of hash functions. Cryptographic hash functions are designed so that changing a single bit in the input should change many (around 1/2) of the output bits. So, say you have a good hash function $h$ (e.g., SHA256 though MD5 should work for your purposes too) a good...
Im trying to understand if nowadays using AES is secure or not, after reading some arguments on Schneier’s blog (to be more exact, [a comment to “The NSA Is Breaking Most Encryption on the Internet”][1]) it seems like it is not secure: > Now as the NSA GCHQ et al know very well the more efficient you make the implem...
**The scheme as you describe it in itself may be secure in some (especially) theoretical environment.** However, I don't suggest to use it, because any attempt to use of values passed between the peers can possibly undermine the security of the scheme as can e.g. insecure RNGs. I have expressed a few concerns below...
**Attack scenario:** SSD physically retrieved from a computer that is turned off. The entire disk is encrypted with AES 256-bit (GNU/Linux, LUKS). The SSD has had TRIM enabled for several years and the file system has seen a lot of use, i.e. a lot of files deleted over time (triggering TRIM). Assume that the key use...
I have been working on a Bloom Filter implementation recently and after a discussion with a co-worker about how many hashing functions to use I told him I was limited with using hashing functions that are already implemented and didn't want to risk the loss of distribution if I derive hashing functions from them. We...
In [this paper][1] on pg. 1236 under the section "Security Against Continual Leakage" the authors say: > We further remark that the weaker security notion previously > achieved cannot be extended meaningfully to continual leakage in the > MPC setting. That is, it cannot address the setting where the n users > do...
I created a basic file encryption method, that seems pretty secure to me (based on an answer below, it seems to be an implementation of the Vigenère cipher) , but one of my colleagues claims that it can be cracked if you know the length of the password. The way the encryption works, is that it reads the byte value ...
I know I am in delay, but just to give my opinion: AES maybe secure, even RSA maybe secure but unlike one time pad they do not have a mathematical proof of secure. And the fact that NSA recommends to use AES give me some doubts… - Do they recommend this because they know how to break it? - Why the line communica...
In [this paper][1] on pg. 1236, under the section "Security Against Continual Leakage", the authors say: > "We further remark that the weaker security notion previously > achieved cannot be extended meaningfully to continual leakage in the > MPC setting. That is, it cannot address the setting where the $n$ users ...
>Are there such things as standard "test vectors" for steganalysis? Not that I am aware of. >How could I do this? Your best bet would be to look for steganographic systems that are out there (either software or a paper describing it). Implement those systems and see how your steganalysis method works. Then you...
**The scheme as you describe it in itself may be secure in some (especially) theoretical environment.** However, I don't suggest to use it, because any attempt to use of values passed between the peers can possibly undermine the security of the scheme as can e.g. insecure RNGs. I have expressed a few concerns below...
The "How" is already explained well by others, but as far I can see, nobody wrote about "*What* does asymmetric encryption do?". It does **not**, as many think, magically allow two parties Alice and Bob to communicate *securely* over a public channel. Instead, it converts an *authentic* channel from Alice to Bob ...
Schneier [says][1]: > Fewer and smaller S-boxes. It may be possible to reduce the number of > S-boxes from four to one. Additionally, it may be possible to overlap > entries in a single S-box: entry 0 would consist of bytes 0 through 3, > entry 1 would consist of bytes 1 through 4, etc. The former > simplificati...
How would using only one s-box affect security of Blowfish?
Is there a way to setup a hierarchical encryption using public key encryption ? Let's say a higher level user can decrypt messages encrypted by lower level users. Is it something possible ? I guess it is only possible to do with hierarchical key management, like the higher level users have access to the lower level ...
Is there a way to setup a hierarchical encryption using public key encryption? Let's say a higher level user can decrypt messages encrypted by lower level users. Is that possible? <br> I guess it is only possible to do with hierarchical key management, like the higher level users have access to the lower level use...
Let's say A wants to send a message, so everyone who gets the message, can be assured that it's from A. A then sends a message `message|timestamp|E(A_private_key, Hash(message|timestamp))` What are the benefits of timestamp? How can a person who gets the message know that it's the correct timestamp? Why just not sen...
I am using OpenSSL libs to generate signatures. Internally, I learn that a signature is a hash of the message with some padding added to it. I am trying to understand the structure of a signature. If I use SHA1 as the digest algorithm for the signature, and say a 1024 bit Key, can you please tell me how the signature ...
What does an RSA signature look like?
So finding a pre-image means given the hash value, one tries to find a message that gives this value using the function's standard IV. What about pseudo-preimage?
What does pseudo pre-image of a hash function mean?