instruction
stringlengths
15
30k
Introduce tow one-way functions(like $h$ and $g$) such that their composition is not one-way function? I appreciate any help
Introduce two distinct one-way functions(like $h$ and $g$) such that their composition is not one-way function? I appreciate any help
The more i start to learn about cryptography the more I hear it is unsafe to 'create' your own cryptographic protocol. With this I mean combining cryptographic primitives like HMAC, AES and RSA However the only protocol, which is also suited for small embedded devices, i know of is TLS. are there any other protocols...
Is creating a own protocol safe or should TLS always be used?
Is it possible to have two distinct one-way functions (called, say, $h$ and $g$) such that their composition $h \circ g = [\, x \mapsto h(g(x)) \,]$ is not one-way?
How to compute $ g^{1/(e_1+s)}$, where $g$ is the generator of group $\mathbb G$, and $e_1$ and $s$ are keys?
Encrypt then MAC. Do I need to include the IV in what I'm HMACing, of just the AES256 encrypted data?
Encrypt then MAC. Do I need to include the IV in what I'm HMACing, of just the AES256 encrypted data?
In the setting of Encrypt-then-MAC, do I need to include the IV in what I'm HMACing, or is authenticating just the AES-encrypted data sufficient?
Encrypt-then-MAC: Do I need to authenticate the IV?
I've been baffled by all the different kinds of names which are given to cryptographic algorithms. there are block ciphers and stream ciphers (AES and RC4) there is symmetric and asymmetric encryption. (AES and RSA) and i get that block ciphers and stream ciphers are symmetric encryption, but [wikipedia][1] make...
It's my understanding that Electronic Code Book (ECB) produces similar cypher text for similar plaintext inputs which is not a good thing. To get around that, Cypher Block Chaining (CBC) can be used to increase diffusion within the encrypted message. For example an algorithm could take the previous block's cypher tex...
Is the 1st Encrypted Block Less Secure Than Subsequent Ones?
It sounds like you're basically asking for a definition of the word "cipher". I agree that it's somewhat fuzzy and complicated — that's mainly because "cipher", on its own, is not a precisely defined technical term in modern cryptography, but a descriptive word whose meaning, like that of most other English word...
Perhaps. You indicate this is from an embedded device. This strongly implies everything the device needs to decrypt it is already present in the firmware of the machine, including both the algorithm and the key. [Here is a blog post][1] on how a talented engineer accomplished a similar feat through reverse engineeri...
I decrypted a file which was encrypted with OpenSSL and AES-128 with the wrong password. Before I noticed it was the wrong password I removed the original file. Is there a possibility to reproduce the original encrypted file? I know the "wrong" password. Thanks in advance.
I decrypted a file which was encrypted with OpenSSL and AES-128 with the wrong password. Before I noticed it was the wrong password I removed the original file. Is there a possibility to reproduce the original encrypted file? I know the "wrong" password. Thanks in advance. **EDIT** The only file I have is the ...
Assume you have a finite group $\mathbb{G}$ and an integer $n$. Given $g_1,\dots,g_n,t$ chosen uniformly from $\mathbb{G}$, consider the problem of finding a vector $(a_1,\dots,a_n)\in \mathbb{Z}^n$ such that $$g_1^{a_1}\cdot \ldots \cdot g_n^{a_n} = t $$ Is there any class of groups where the problem is known to ...
Is this discrete log generalization a well known cryptographic assumption?
How to compute $ g^{1/(e_1+s)}$, where $g$ is the generator of group $\mathbb G$, and $e_1$ and $s$ are keys? and I know only $ g^{e_1}$ (not $e_1$) and s. G has prime order for some prime p and e1,s are some elements of Zp.
How to compute $ g^{1/(e_1+s)}$, where $g$ is the generator of group $\mathbb G$, and $e_1$ and $s$ are keys? and I know only $ g^{e_1}$ (not $e_1$) and s. G has prime order for some prime p and e1,s are some elements of Zp. To clarify i want to compute $ g^{1/(e_1+s)}$ and i know $ g^{e_1}$ ,s and p but i don't...
I would like to refer you to page 430 of the [Handbook of Applied Crypto][1], where the authors said "... reordering of multiple signed blocks presents a security risk..." This statement was made in reference to not breaking messages into fixed lengths which can then be signed individually using signature schemes wi...
> How does the security risk arise? Because you can simply drop or reorder signatures for single block. Assume you have a message $m$ and you split it up in blocks $(m_1,m_2,\ldots,m_n$) and get signatures $(\sigma_1,\sigma_2,\ldots,\sigma_n$). Then you could just drop for instance $\sigma_2$ and get a signature for...
The more I start to learn about cryptography the more I hear it is unsafe to 'create' your own cryptographic protocol. With this I mean combining cryptographic primitives like HMAC, AES and RSA However the only protocol, which is also suited for small embedded devices, I know of is TLS. are there any other protocols...
The more I start to learn about cryptography the more I hear it is unsafe to 'create' your own cryptographic protocol. With this I mean combining cryptographic primitives like HMAC, AES and RSA However the only protocol, which is also suited for small embedded devices, I know of is TLS. are there any other protocols...
I know you always need to use a mode of operation when using a block cipher, AES for example, and [Wikipedia has a good explanation for what modes of operation are][1] Now I know if i do not use a mode of operation every time i encrypt the same plain text (abc) with the same key (klm) i get the same cipher text (zyx...
Why are modes of operation used, what attacks do they prevent?
For quite some time I've been thinking about the idea to construct a hashing algorithm that contains its own checksum value, and thereby can verify itself. With hashing algorithms like SHA1 and MD5 this seems to be difficult although not impossible as [explained here](http://crypto.stackexchange.com/a/9920/23290). The ...
The CKM_RSA_PKCS Mechanism in [PKCS#11 v2.20 section 12.1.6 _PKCS&thinsp;#1 v1.5 RSA_][1] is a signature scheme intended to allow implementation of [RSASSA-PKCS1-v1_5 of PKCS#1][2] for data hashed externally to a PKCS#11 token. With an RSA modulus $N$ of $k$ bytes ($2^{8k-8}\le N<2^{8k}$), CKM_RSA_PKCS signature ...
Can CKM_RSA_PKCS signature be made secure by lowering its maximum input size?
For quite some time I've been thinking about the idea to construct a hashing algorithm that contains its own checksum value, and thereby can verify itself. With hashing algorithms like SHA1 and MD5 this seems to be difficult although not impossible as [explained here](http://crypto.stackexchange.com/a/9920/23290). The ...
It looks like that only difference between two of them the variables. But it does not make sense for me and I could not find exact definition of arithmetic secret sharing scheme. I mean what exactly this is? (Most of you understand that I am really new in these stuff.) Thank you.
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...
I'm implementing a public key cryptosystem in a propietary System On Chip that only allows modular reductions by n. However, that cryptosystem requires (n*n) modular reductions. Perhaps someone knows a strategy for performing those reductions relying on a modular reducer by n? The Montgomery reduction requires a va...
How to compute $ g^{1/(e_1+s)}$, where $g$ is the generator of group $\mathbb G$, and $e_1$ and $s$ are keys? I know only $s$ and $g^{e_1}$, not $e_1$. $\mathbb G$ has prime order for some prime $p$ and $e_1$ and $s$ are some elements of $\mathbb{Z}_p$.
I am currently learning about encryption and I was asked a question: If a user wants to securely communicate with another user but only uses a DES crypto system. With no shared DES key with the other user, how would they securely send a message without the use of a third party? I was researching this and I came a...
I need to securely generate RSA key pair and I need to have access to private exponent in order to process it further. What's the difference in FIPS 140-2 and FIPS 186-4 in connection with RSA key pair generation? If I understand it correctly generating RSA key pair in FIPS 140-2 compliant environment will never ...
My mac was recently upgraded to OS X Yosemite and FileVault2 full disk encryption was turned on. Encryption finished, but things went horribly wrong and key parts of the disk are filled with all 0s (it's a 512GB SSD). By reading [Infiltrate the Vault: Security Analysis and Decryption of Lion Full Disk Encryption][1]...
Server A produces signed messages on request. You can tell server A what type of RSA padding to use in the signature (either RSASSA-PKCS1v1_5 or RSASSA-PSS). Either way, the message will be signed using the same private key. The signed message is a JSON object where you can supply some of the fields, but the server ...
I think what you're missing here is that a cryptographic hash by itself is not actually sufficient to verify the integrity of a message. Consider this: I want to send a message over the Internet (on an insecure connection, e.g. UDP), but have it be protected from tampering. I take the message and attach at the end...
I've developed a bit of mathematica code that can find primes within a range of numbers. For example, if I wanted all the primes between one million and two million, it could do that. Of what use is this code I invented ? The only thing I could think of was that if one wanted to find two primes of a certain size fo...
Of what use is my code for finding prime numbers of a certain size?
Suppose the honest parties - Alice and Bob - exchange public key in person/via telephone so that attacker can only eavedrop on the line. Alice has hashed the public key using a collision resistance hash function H before telling it to Bob. Bob will encrypt a random k using key = H(pk) and read it off to Alice. Later on...
Suppose the honest parties - Alice and Bob - exchange public key in person/via telephone so that attacker can only eavedrop on the line. Alice has hashed the public key using a collision resistance hash function H before telling it to Bob. Bob will encrypt a random k using key = H(pk) and read it off to Alice for the a...
I've been baffled by all the different kinds of names which are given to cryptographic algorithms. There are block ciphers and stream ciphers (AES and RC4). There is symmetric and asymmetric encryption (AES and RSA). I get that block ciphers and stream ciphers are symmetric encryption, but [Wikipedia][1] makes...
The CKM_RSA_PKCS Mechanism in [PKCS#11 v2.20 section 12.1.6 _PKCS&thinsp;#1 v1.5 RSA_][1] is a signature scheme intended to allow implementation of [RSASSA-PKCS1-v1_5 of PKCS#1][2] for data hashed externally to a PKCS#11 token. With an RSA modulus $N$ of $k$ bytes ($2^{8k-8}\le N<2^{8k}$), CKM_RSA_PKCS signature ...
The CKM_RSA_PKCS Mechanism in [PKCS#11 v2.20 section 12.1.6 _PKCS&thinsp;#1 v1.5 RSA_][1] is a signature scheme intended to allow implementation of [RSASSA-PKCS1-v1_5 of PKCS#1][2] for data hashed externally to a PKCS#11 token. With an RSA modulus $N$ of $k$ bytes ($2^{8k-8}\le N<2^{8k}$), CKM_RSA_PKCS signature ...
Traditional encryption is weak and no longer be used. They can be easily broken by using frequency analysis is a well-known fact. But, the frequency analysis often depends on the number of captured ciphertext, or the duplication of the text. What if the text was compressed by some types of algorithms (such as Huffma...
If the text was compressed before using traditional cryptography, how much difficulty increases for frequency analysis attack?
Do clients use WPS every time when they connect to a WPS-enabled AP? Or maybe they do it just the first time and then they switch to a normal WPA/WPA2 key exchange? If the latter, it's possible for an AP to force a client to use WPS every time?
As I understand, diffusion property in AES-CBC ensures that one-bit change in plaintext will yield changes in all following blocks in ciphertext upon encryption. I'm looking for algorithm that will have this property on ciphertetxt. I.e. when I change one bit in ciphertext, then plaintext after decryption will be c...
The *Inhomogeneous Short Integer Solution* (ISIS) problem is as follows: given an integer $q$, a matrix $A \in \mathbb Z^{n\times m}_q$, a vector $b\in \mathbb Z^n_q$, and a real $\beta$, find an integer vector $e\in \mathbb Z^m$ such that $Ae = b \mod q $ and $||e||_2 \leq \beta$. Now assume $e_0$ is a solution to ...
Looking at the excellent explaination of the attack here: http://crypto.stackexchange.com/questions/12688/can-you-explain-bleichenbachers-cca-attack-on-pkcs1-v1-5 I have one additional question: It says that: ""To prevent this attack, SSL servers do not inform the client about padding woes. If decryption fails becau...
Why is this a fix to Bleichenbacher's attack?
NIST has a total of 3 approved block ciphers on [their website][1]: AES, TDES and skipjack. I get why those are on there (though personally I find TDES a bit iffy) but from my understanding Twofish and Serpent are also good enough to make the list. so why aren't they there? are they too weak? have they been broken t...
Why is towfish or other algorithms not NIST approved, are they still safe?
NIST has a total of 3 approved block ciphers on [their website][1]: **AES**, **TDES** and skipjack. I get why those are on there (though personally I find **TDES** a bit iffy) but from my understanding **Twofish** and **Serpent** are also good enough to make the list. so why aren't they there? are they too weak? hav...
Why are twofish or other algorithms not NIST approved, are they still safe?
> Why does this prevent the attack? Why doesn't the attacker just infer that the connection failed because of the bad padding? Why else could the connection fail? Well, the connection may fail because the host decrypted a valid pre-master secret, and it wasn't the pre-master secret that we expect. That is, when t...
NIST has a total of 3 approved block ciphers on [their website][1]: **AES**, **TDES** and skipjack. I get why those are on there (though personally I find **TDES** a bit iffy) but from my understanding **Twofish** and **Serpent** are also good enough to make the list. so why aren't they there? are they too weak? hav...
As I understand, diffusion property in AES-CBC ensures that one-bit change in plaintext will yield changes in all following blocks in ciphertext upon encryption. I'm looking for algorithm that will have this property on ciphertext. I.e. when I change one bit in ciphertext, then plaintext after decryption will be ch...
> Yeah, the question is something like "A customer wants to to secure their communications with &lt;company&gt; but the customer can only use a DES crypto system and does not have a shared DES key with &lt;company&gt;. How can they securely communicate without help from a third party?" Well, the customer could call ...
NIST has a total of 3 approved block ciphers on [their website][1]: **AES**, **TDES** and **skipjack**. I get why those are on there (though personally I find **TDES** a bit iffy) but from my understanding **Twofish** and **Serpent** are also good enough to make the list. so why aren't they there? are they too weak?...
Consider two types of attackers on a key exchange (KE) protocol and subsequent communi- cation between the parties which used this KE instance to establish a secure communication key. Attacker Eve eavesdrops on their links, both over the internet and over telephone, while attacker Mallory can stage a man-in-the-middle...
I've developed a bit of Mathematica code that can find primes within a range of numbers. For example, if I wanted all the primes between one million and two million, it could do that. Of what use is this code I invented ? The only thing I could think of was that if one wanted to find two primes of a certain size fo...
Consider two types of attackers on a key exchange (KE) protocol and subsequent communication between the parties which used this KE instance to establish a secure communication key. Attacker Eve eavesdrops on their links, both over the internet and over telephone, while attacker Mallory can stage a man-in-the-middle at...
Assuming the Alphabet is only 26 values, you have: 26! or 403,291,461,126,606,000,000,000,000 ways of rearranging it. This is not key space for a single substitution alpha. You would need to be able to create, or at least have the means of creating, n random Alphas for the number to be relevant. An encryption ...
I am a bit confuse about the term, variable-base point/scalar multiplication, in Elliptic Curve Cryptography. What I have understood so far. It means that the base or point on EC is variable/unknown. Am I right?
What does variable-base point/scalar multiplication mean in ECC?
This may seem like a simple question, but I have just started studying cryptography and I can't seem to find any information on this at all. I am trying to write a "simple" encrypted messenger using Java's Cryptography Architecture and Extensions, and I have been studying pentesting on the side, and I was wondering if ...
How do you break encryption on a message?
I tried to understand the inner working of XTS. What I understood is that it is applying the tweak two times: once on the plaintext and once on the output. What is the benefit of applying the tweak on the cipher text also? Cheers, Tamas
What is the benefir of applying the tweak second time using XTS?
I'm building an application where users can be a part of groups, and can obtain and distribute URLs from the group page that allow anyone who clicks on them to join said group. Groups should not otherwise be join-able without a proper URL (or an invite from within the system, but that's another matter). Currently, I...
I'm building an application where users can be a part of groups, and can obtain and distribute URLs from the group page that allow anyone who clicks on them to join said group. Groups should not otherwise be join-able without a proper URL (or an invite from within the system, but that's another matter). Currently, I...
My professor stated that permutations which are done repeatedly does not further enhance security than just one permutation. He also stated that fact this applies to consecutive substitutions as well. Algorithms such as AES which intertwine permutation and substitution in each round does in fact increase security. I un...
Why does consecutive permutations or consecutive substitutions not enhance security?
I tried to understand the inner working of XTS. What I understood is that it is applying the tweak two times: once on the plaintext and once on the output. What is the benefit of applying the tweak on the cipher text also?
What is the benefit of applying the tweak a second time using XTS?
I've asked some other questions before about the Rijndael's SBoxes, and step by step I'm coming to an understanding. But those steps often guides me to new questions. I did some lines of code to understand how these SBoxes works implementing $S(z) = f(g(z))$ where $g(z)$ is the transformation by multiplicative inver...
In Rijndael Sboxes, from where mu and nu polynomial ring elements comes from?
Perhaps the professor was misquoted; **the assertion that (in the context of constructing cryptographic algorithms) "_permutations which are done repeatedly does not further enhance security than just one permutation_" is wrong**. Proof by an extreme example: consider a variant of [DES][1] where we insert after per...
Perhaps the professor was misquoted; **the assertion that (in the context of constructing cryptographic algorithms) "_permutations which are done repeatedly does not further enhance security than just one permutation_" is wrong**. Proof by an extreme example: consider a variant of [DES][1] where we insert after per...
Perhaps the professor was misquoted; **the assertion that (in the context of constructing cryptographic algorithms) "_permutations which are done repeatedly does not further enhance security than just one permutation_" is false**. Proof by an extreme example: consider a variant of [DES][1] where we insert after per...
I'm implementing a public key cryptosystem in a proprietary System On Chip that only allows modular reductions by $n$. However, that cryptosystem requires ($n^2$) modular reductions. Perhaps someone knows a strategy for performing those reductions relying on a modular reducer by $n$? The Montgomery reduction requir...
I've asked some other questions before about Rijndael's S-boxes, and step by step I'm coming to an understanding; but those steps often guide me to new questions. I did some lines of code to understand how these S-boxes work implementing $S(z) = f(g(z))$ where $g(z)$ is the transformation by multiplicative inverse i...
Rijndael S-boxes: Where do the $\mu$ and $\nu$ polynomial ring elements come from?
Let's say: an error is induced into an implementation of the AES-128 to produce a faulty ciphertext. The error is a one-byte eror and is always induced on the last state byte, during round9, before the `MixColumns` operation. The induced errors are unknown and can be different. However the key is the same in both cases...
while working with Encryption mostly cipher text is always larger the plain text, why isn't that the case when downloading a file using https ? even that compression isn't much used anymore because if the **CRIME** and **BREACH** exploits the file still has the exact same size as a http download. **UPDATE** : someth...
why do files downloaded with http and https have the same size?
I am trying to decrypt a completely black gif that I know has been encrypted by some sort of steganography. I've tried subtracting the bytes of the images with each other, and so far I have gotten a really weird image consisting of seemingly random patterns of black and white pixels. What are the most common techniques...
I have an embedded device. It produces larges files (200 MB). I want the device to encrypt the file before writing to disk, so I gave them all a 16-byte random key. How can I transform the large file with the small key, with the least amount of CPU? If I XOR the data with the 16byte key, its almost good enough....
Reusing an onetime pad?
I need to use NIST SP 800-22 approved software / hardware to generate RSA key pair. Where I can find a list of certified software / hardware RNGs compliant to NIST SP 800-22? And how is the SP 800-22 related to FIPS 186-x? If I generate RSA key pair with approved software compliant to FIPS 186-x, does it mean tha...
Where I can find a list of certified software / hardware RNGs compliant to NIST SP 800-22?
I need a very light encryption which costs almost no performance while encrypting (decryption can be slow). I found 3 algorithms: LED, PRESENT, and Piccolo. But how do I pick one?
What is the most light-weight crypto thats still usefull?
Chosen Ciphertext Attacks against RSA (such as [Bleichenbacher's Attack on PKCS #1 encryption][1]) do not actually reveal the private key. If they don't, they why do we say that they are a threat? Well, it's because that the keys are generally not of interest to the attacker. Instead, given an encrypted message, t...
I'm attempting to automate some checks against a large list of .NET assemblies, and want to include a test to see if the RSA parameters used to sign the assemblies are sensible. However, since I don't have access to their private keys, I'm wondering how far I can go. At the moment I'm reporting if: * The modulus ...
Given only RSA public key parameters, what security issues might I be able to detect?