instruction
stringlengths
15
30k
[Also posted to the Mathematics StackExchange][1] I have a wireless capture of data and it's 12 bit hash. I am trying to identify the actual function that would have generated the hash data. I tried all the generic 12 bit CRC polynomials but none of them seem to generate the appropriate output. Any ideas on ho...
This has probably been asked before but for a given ciphertext and plaintext pair, is it possible to have two different keys producing said pair? Or there are no collisions in AES, unlike hashing algorithms such as SHA1, SHA256, etc?
Is it possible for a given plaintext and ciphertext to have two different keys?
I have code where someone made the key 64 bytes (32*2) and passes to the `derive_key()` function. It then uses the key created for `aes_encrypt_key256()` which would only use 32 bytes. Is there any good reason why the code is doing that vs just using a 32 byte key that is passed to `derive_key()` ? TIA!!
Using longer key with Gladman RFC2898 derive_key() function for AES256?
Using longer key with PKCS#5 derive_key() function for AES256?
First time question poster so I hope the below is clear enough :). **Problem summary**: Can a Holder and Verifier safely use ECDH for a Challenge-Response protocol where: 1. the Holder proves possession and control over a private key $d$ using material that a trusted Issuer signs, and 2. the Verifier learns no ...
First time question poster so I hope the below is clear enough :). **Problem summary**: Can a Holder and Verifier safely use ECDH for a Challenge-Response protocol where: 1. the Holder proves possession and control over a private key $d$ using material that a trusted Issuer signs, and 2. the Verifier learns no ...
Can DH be used for privacy-preserving proof of possession?
I know next to nothing about cryptography. From what I have understood, anything that is provable can be done so using a zero knowledge proof (the result seems to be known from the 1980's or so, by S. Micali & al.) Starting from a given chess position, I want to use zero knowledge proof for a Prover to convince a Ve...
I know next to nothing about cryptography. From what I have understood, anything that is provable can be done so using a zero knowledge proof (the result seems to be known from the 1980's or so, by S. Micali & al.) Starting from a given chess position, I want to use zero knowledge proof for a Prover to convince a Ve...
What does it mean when we say something like „we need more than polynomial time many cipher texts“? I understand it as „an adversarial can run for polynomial time and try as many messages as possible in an exhaustive search on our encoded message in this time. We need more messages than the maximum the adversarial can ...
I am exploring the implementation of a cryptographic signature that users can manually input, and I am willing to compromise security to a level where a hacker investing several thousand dollars in hardware can potentially crack it! From my research, BLS seems suitable, but the standard signature size is too large f...
I have a wireless capture of data and it's 12 bit hash. I am trying to identify the actual function that would have generated the hash data. I tried all the generic 12 bit CRC polynomials but none of them seem to generate the appropriate output. Any ideas on how I could reverse engineer the hash function? ...
First time question poster so I hope the below is clear enough :). **Problem summary**: Can a Holder and Verifier safely use ECDH for a Challenge-Response protocol where: 1. the Holder proves possession and control over a private key $d$ using material that a trusted Issuer signs, and 2. the Verifier learns no ...
First time question poster so I hope the below is clear enough :). **Problem summary**: Can a Holder and Verifier safely use ECDH for a Challenge-Response protocol where: 1. the Holder proves possession and control over a private key $d$ using material that a trusted Issuer signs, and 2. the Verifier learns no ...
The question I'm wondering is whether the AES cipher is a closed cipher (which is equivalent to AES being a group). And this question interests me due to the lack of understanding of whether it is possible to encrypt using the AES algorithm with two different keys and hope for increased strength, as for example in 3DES...
Is AES a group?
Let us recall the ***Schnorr Protocol***, following Chris Peikert's excellent Notes on the [*Theory of Cryptography*][1]. **Protocol.** Let $G=\langle g \rangle$ be a cyclic group of order $q$. We consider an arbitrart element $x\in G$, having Discrete Logarithm $w=:\log_g(x)$. The input to the *Prover* $P$ is $x,w...
Let us recall the ***Schnorr Protocol***, following Chris Peikert's excellent Notes on the [*Theory of Cryptography*][1]. **Protocol.** Let $G=\langle g \rangle$ be a cyclic group of order $q$. We consider an arbitrary element $x\in G$, having Discrete Logarithm $w=:\log_g(x)$. The input to the *Prover* $P$ is $x,w...
What does it mean when we say something like „we need more than polynomial time many cipher texts“? I understand it as „an adversarial can run for polynomial time and try as many messages as possible in an exhaustive search on our encoded message in this time. We need more messages than the maximum the adversarial can ...
Let's assume that the password to be cracked is 15 characters long and consists of numbers (to keep the math simple). Let's assume the attacker has the following information about the password: - It is at least 8 characters long - It consists of numbers. - It is random What is the maximum number of combinations t...
I have this uni project that I have to implement in code: "App for Secure delivery of the gray images, encryption-decryption with AES in OFB mode + secret key delivery using Merkle–Hellman knapsack + DSA signature" I am struggling with structure of the program and how to combine these algorithms together. **W...
Let us recall the ***Schnorr Protocol***, following Chris Peikert's excellent Notes on the [*Theory of Cryptography*][1]. **Protocol.** Let $G=\langle g \rangle$ be a cyclic group of order $q$. We consider an arbitrary element $x\in G$, having Discrete Logarithm $w=:\log_g(x)$. The input to the *Prover* $P$ is $x,w...
Im reviewing my crypto and I would like to prove the following: RSA experiment where the adversary is given (N, e, y) where N = pq and p, q are two primes. The adversary knows p, q. How can I build an adversary that wins with probability 1? I know the RSA scheme is built on the idea that it is hard to find 2 large p...
I tried to understand how dense the Mod-LWR samples are in some space. I tried to see from a view similar to LWE, i.e. using GV-bound. But I have some difficulties with the parameters. Take the Mod-LWR samples used in Saber as example: If the maximum number of Saber codes is denoted by $a$, and the minimum distan...
How to measure the denseness of Mod-LWR samples in some space?
It’s an interesting little maths problem, but why the restrictions? It makes passwords just harder to type, and i can just add another letter or two if you think it’s not secure enough. And please don’t restrict the password length. I actually tried to comment on an article aimed at the layman about the importance ...
Given a private key using algorithm RSA-PSS with SHA256 is it possible to use this key to sign a JWT using algorith RS256 (RSA with SHA256) instead of PS256 (RSA-PSS with SHA256)? The German government seems to be of the opinion it is possible and wants us to do this for one of their new tax reporting related APIs....
sign a JWT with RS256 using a RSA-PSS SHA256 key pair?
First time question poster so I hope the below is clear enough :). **Problem summary**: Can a Holder and Verifier safely use ECDH for a Challenge-Response protocol where: 1. the Holder proves possession and control over a private key $d$ using material that a trusted Issuer signs, and 2. the Verifier learns no ...
I tried to understand how dense the Mod-LWR samples are in some space. I tried to see from a view similar to LWE, i.e. using GV-bound(maybe LPN is better example because GV-bound is for codes). But I have some difficulties with the parameters. Take the Mod-LWR samples used in Saber as example: If the maximum numbe...
I know next to nothing about cryptography. From what I have understood, anything that is provable can be done so using a zero knowledge proof (the result seems to be known from the 1980's or so, by S. Micali & al.) Starting from a given chess position, I want to use zero knowledge proof for a Prover to convince a Ve...
Assume the discrete log problem: $g^x mod (p) = h$ For sure, $p$ is a prime number and $g$ is its primitive root or generator and assume that Alice sent $h$ to Bob and middle man caught it. So attacker knows $g, p, h$ and wants to find $x$. One solution is for the attacker to try all possible values. The modul...
Discrete log problem - does luck exist?
does anybody have a library of fastest parity finding algorithms in RNS representation ? I'm super happy I found a fast algorithm, but since it is quite simple, I need to check whether it exists or not. Thanks Edit: by parity I mean $ x \textrm{ mod } 2 $ where $x$ is the number between 0 and $N=\Pi m_i$ and all...
What’s tbe smallest sha256 hash that was ever produced?
Based on the comments I did some further reading. I think a multi-party DH key exchange (c.f., [1025](https://crypto.stackexchange.com/questions/1025/can-one-generalize-the-diffie-hellman-key-exchange-to-three-or-more-parties)) can serve as a basis for what I am after. More specifically, in a three party DH setting...
What’s the smallest sha256 hash that was ever produced?
What’s the smallest known sha256 hash that was ever produced?
In the eliptic curve cryptography, we use modulus $y^2 = (x^3 + ax + b) \ \ \text{mod} \ \ p$ So using modulus definitely changes the graph points completely - i.e gives a completely different graph than $y^2 = x^3 + ax + b$ would give. What's the easy explanation of why we use modulus ? In Diffie-Hellman, I unde...
I’ve a signature system using modular exponentiation where having the exponent being a composite with a known factor allows to forge signatures… In order to check if the exponent is a prime number, the Integer has to pass 27 rounds of miller‑rabin : if it is found to be composite, then the signature is rejected. ...
I’ve a signature system using modular exponentiation where having the exponent being a composite with a known factor allows to forge signatures… In order to check if the exponent is a prime number, the Integer has to pass 27 rounds of miller‑rabin : if it is found to be composite, then the signature is rejected. ...
Why is a modulus used in Eliptic Curve Cryptogrpahy?
Why is a modulus used in Elliptic Curve Cryptography?
Does anybody have a library of fastest parity finding algorithms in RNS representation? By parity I mean $x \bmod 2$ where $x$ is the number between $0$ and $N=\Pi m_i$ and all moduli are odd. I have found a fast algorithm, but since it is quite simple, I need to check whether it pre-exists or not. I found a referen...
I'm helping a company to redesign their cryptographic protocol for communication within a network of embedded devices. So far I have discovered several insecure practices, such as using very short (6 characters) passwords to derive AES symmetric keys and so on. When redesigning the protocol, I wanted to use stre...
I'm helping a company to redesign their cryptographic protocol for communication within a network of embedded devices. So far I have discovered several insecure practices, such as using very short (6 characters) passwords to derive AES symmetric keys and so on. When redesigning the protocol, I wanted to use stre...
I’ve a signature system using modular exponentiation where having the exponent being a composite with a known factor allows to forge signatures… In order to check if the exponent is a prime number, the Integer has to pass 27 rounds of miller‑rabin (**though with always using the same base**) : if it is found to be c...
I'm helping a company to redesign their cryptographic protocol for communication within a network of embedded devices. So far I have discovered several insecure practices, such as using very short (6 characters) passwords to derive AES symmetric keys and so on. When redesigning the protocol, I wanted to use stre...
> How to prove the security of the PRNG? My best advice would be to start with a statistical test suite like the one NIST describes in ["A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications"](http://csrc.nist.gov/publications/nistpubs/800-22-rev1a/SP800-22rev1a.pdf) (...
Beware that _"key delivery using **Merkle**-Hellman knapsack"_ has very little to do with _**Diffie**-Hellman key exchange_, which seems to be the basis of what has been implemented for key delivery. Key delivery using Merkle–Hellman knapsack would draw a random secret key, and encrypt it per the [Merkle–Hellman kna...
> 1. How would you deal with a user who produced a steady stream of valuable answers, but tends to generate a large number of arguments/flags from comments? The fundamental question is what is triggering arguments and flags. The Code of Conduct basically outlines good behavior, and if someone needs to be reminded ...
Beware that _"key delivery using **Merkle**-Hellman knapsack"_ has very little to do with _**Diffie**-Hellman key exchange_, which seems to be the basis of what has been implemented for key delivery. Key delivery using Merkle–Hellman knapsack would draw a random secret key, and encrypt it per the [Merkle–Hellman kna...
Beware that _"key delivery using **Merkle**-Hellman knapsack"_ has very little to do with _**Diffie**-Hellman key exchange_, which seems to be the basis of what has been implemented for key delivery. Key delivery using Merkle–Hellman knapsack would draw a random secret key, and encrypt it per the [Merkle–Hellman kna...
Beware that _"key delivery using **Merkle**-Hellman knapsack"_ has very little to do with _**Diffie**-Hellman key exchange_, which seems to be the basis of what has been implemented for key delivery. Key delivery using Merkle–Hellman knapsack would draw a random secret key, and encrypt it per the [Merkle–Hellman kna...
Beware that _"key delivery using **Merkle**-Hellman knapsack"_ has very little to do with _**Diffie**-Hellman Key Exchange_ (DHKE, often abbreviated DH as in the question's title) which seems to be the basis of what has been implemented for key delivery. Key delivery using Merkle–Hellman knapsack would draw a random...
Beware that _"key delivery using **Merkle**-Hellman knapsack"_ has very little to do with _**Diffie**-Hellman Key Exchange_ (DHKE, often abbreviated DH as in the question's title) which seems to be the basis of what has been implemented for key delivery. Key delivery using Merkle–Hellman knapsack would draw a random...
Beware that _"key delivery using **Merkle**-Hellman knapsack"_ has very little to do with _**Diffie**-Hellman Key Exchange_ (DHKE, often abbreviated DH as in the question's title) which seems to be the basis of what has been implemented for key delivery. Key delivery using Merkle–Hellman knapsack would draw a random...
Beware that _"key delivery using **Merkle**-Hellman knapsack"_ has very little to do with _**Diffie**-Hellman Key Exchange_ (DHKE, often abbreviated DH as in the question's title) which seems to be the basis of what has been implemented for key delivery. Key delivery using Merkle-Hellman knapsack would draw a random...
Beware that _"key delivery using **Merkle**-Hellman knapsack"_ has very little to do with _**Diffie**-Hellman Key Exchange_ (DHKE, often abbreviated DH as in the question's title) which seems to be the basis of what has been implemented for key delivery. Key delivery using Merkle-Hellman knapsack would draw a random...
Beware that _"key delivery using **Merkle**-Hellman knapsack"_ has very little to do with _**Diffie**-Hellman Key Exchange_ (DHKE, often abbreviated DH as in the question's title) which seems to be the basis of what has been implemented for key delivery. Key delivery using Merkle-Hellman knapsack would draw a random...
I'm trying to better understand RSA. One attack I've read about is when the encrypted message $y$ and $N = p\cdot q$ share a common factor. If this happens, we can easily factor $N$ to obtain $p$ and $q$. What are some strategies that can mitigate this potential issue?
How do RSA implementations avoid cases where the ciphertext and N are coprime?
I'm trying to better understand RSA. One attack I've [read](https://medium.com/@raffaelloippolito/rsa-encryption-88c3a2ff0a58) about is when the encrypted message $y$ and $N = p\cdot q$ share a common factor. If this happens, we can easily factor $N$ to obtain $p$ and $q$. What are some strategies that can mitigate ...
Beware that _"key delivery using **Merkle**-Hellman knapsack"_ has very little to do with _**Diffie**-Hellman Key Exchange_ (DHKE, often abbreviated DH as in the question's title) which seems to be the basis of what has been implemented for "secret key delivery". Key delivery using Merkle-Hellman knapsack would draw...
Beware that _"key delivery using **Merkle**-Hellman knapsack"_ has very little to do with _**Diffie**-Hellman Key Exchange_ (DHKE, often abbreviated DH as in the question's title) which seems to be the basis of what has been implemented for "secret key delivery". Key delivery using Merkle-Hellman knapsack would draw...
I've recently read part of a book exploring secure data deletion techniques for many storage mediums. In particular, I read about **assured data deletion** techniques developed for data outsourced to the **cloud**. Many of the alternatives are based on cryptographic techniques using symmetric encryption to encrypt data...
Is there any cryptography-based assured data deletion technique currently as a standard?
I think you might be overthinking the result? The key here is that the simulator has a very powerful advantage, which is that it can *rewind* $V^\ast$, that is, running with many inputs as much as it wants, until something happens. With this in mind, note that in the simulated execution $(z,b,a)$ is distributed as:...
How do RSA implementations avoid cases where the ciphertext and N are not coprime?
Yao introduced a famous notion of securely computing any function between 2 users using a concept of Garbling circuit. How can this idea be extended for n-party case? That is there are n-1 garblers and 1 evaluator. How is the security of n-party garbled circuit defined? When is it useful?
There is a very long line of work on multi-party garbled circuits -- too long to adequately describe in this answer. The first paper introducing multiparty garbling was: * Beaver, Micali, Rogaway: [The Round Complexity of Secure Protocols](https://scholar.archive.org/work/7xxdxj6venfu7crulghyylwssa/access/wayback/ht...
I am looking at ways to blind an ECDSA signing key (and verification key respectively). Looking at proposed solutions like the [IETF KBSS draft](https://datatracker.ietf.org/doc/draft-irtf-cfrg-signature-key-blinding/), and the [IETF ARKG draft](https://datatracker.ietf.org/doc/draft-bradleylundberg-cfrg-arkg/) it s...
RSA can't be used securely as is as it is deterministic. So an encrypted "yes" always looks the same. A simple workaround, which is apparently not secure, is to add 100 bits, say, of random salt to your plaintext before encryption. Why is this not considered secure?
What is insecure about adding salt to your plaintext before using RSA?
> Is there any standardized technique for assured data deletion in the cloud? For some definition of standardized, yes: store data encrypted (symmetrically or with hybrid encryption) in the cloud, with decryption by the legitimate user in an environment they trust. Destruction of the data is by destroying the decryp...
I am curious about the structure of the quotient ring in Ring LWE. So $R=\mathbb Z_q[x]/(x^n+1)$, where q is prime, $x^n+1$ is an irreducible polynomial and $n$ is a power of 2. So, this structure would not be a ring anymore, it would be a field. So, why is it called ring and referred it as Ring LWE?
I have read [1]*Decentralized Multi-authority ABE for NC1 from BDH*, [2]*Decentralizing Attribute-Based Encryption*, [3]*Fully Adaptive Decentralized Multi-Authority ABE*, When I compare security proof in [3](full adaptive), I find out that when construct hybrid games, authors do not rely on public and private key...
in MA-ABE, what is the diference when prove a scheme is selective or static?
> Is there any standardized technique for assured data deletion in the cloud? For some definition of standardized, yes: store data encrypted (symmetrically or with hybrid encryption) in the cloud, with decryption by the legitimate user in an environment they trust. Destruction of the data is by destroying the decryp...
> Is there any standardized technique for assured data deletion in the cloud? For some definition of standardized, yes: store data encrypted (symmetrically or with hybrid encryption) in the cloud, with decryption by the legitimate user in an environment they trust. Destruction of the data is by destroying the decryp...
First, you're right that LPN is better. The GV bound is a "volume bound", where $$\sum_{j=0}^{d-1}\binom{N}{j}(M-1)^j$$ is the volume of a Hamming ball of radius $d$ in $\mathbb{Z}/M\mathbb{Z}$. To see this, note that one can write $$ \mathcal{B}(d) := \{\vec x\in(\mathbb{Z}/M\mathbb{Z})^N \mid \lVert \ve...
> 1. How would you deal with a user who produced a steady stream of valuable answers, but tends to generate a large number of arguments/flags from comments? Probably try to intervene with the problematic comments? It really depends on the severity of the comments though. In my experience users who generate annoying ...
The output of command ``fortune | gpg -vaer <receipent-id>`` has a line that begins with: ``` gpg: RSA/AES256.CFB encrypted for ... ``` What is ``AES256.CFB`` doing here when the key is a RSA key? Isn't data supposed to be just encrypted just with RSA given this is public key cryptography?
What does "gpg: RSA/AES256.CFB encrypted for" mean?
I am asking it again because no one answered my previous question with more clarity. One more co-CDH in Type three pairing groups $G_1 \times G_2 \to G_T$: means given a generator $g_2$ in $G_2$, $A = g_2^a$ and an oracle which which accepts query $Q \in G_1$ and outputs $( Q^a)$ no one should be able to produce a s...
I am asking it again because no one answered my previous question with more clarity. One more co-CDH in Type three pairing groups $G_1 \times G_2 \to G_T$: means given a generator $g_2$ in $G_2$, $A = g_2^a$ and an oracle $\mathcal{O}$ which which accepts query $Q \in G_1$ and outputs $( Q^a)$ no one should be able ...
I am asking it again because no one answered my previous question with more clarity. One more co-CDH in Type three pairing groups $G_1 \times G_2 \to G_T$: means given a generator $g_2$ in $G_2$, $A = g_2^a$ and an oracle $\mathcal{O}$ which which accepts query $Q \in G_1$ and outputs $( Q^a)$ no one should be able ...
I am asking it again because no one answered my previous question with more clarity. I have deleted that question One more co-CDH in Type three pairing groups $G_1 \times G_2 \to G_T$: means given a generator $g_2$ in $G_2$, $A = g_2^a$ with random $a$ and an oracle $\mathcal{O}$ which which accepts query $Q \in G_1...
I am asking it again because no one answered my previous question with more clarity. I have deleted that question One more co-CDH in Type three pairing groups $G_1 \times G_2 \to G_T$: means given a generator $g_2$ in $G_2$, $A = g_2^a$ with random $a$ and an oracle $\mathcal{O}$ which which accepts query $Q \in G_1...
The output of command ``fortune | gpg -vaer <receipent-id>`` has a line that begins with: ``` gpg: RSA/AES256.CFB encrypted for ... ``` What is ``AES256.CFB`` doing here when the key is a RSA key? Isn't the data supposed to be encrypted with with RSA given this is public key cryptography?
The output of command ``fortune | gpg -vaer <receipent-id>`` has a line that begins with: ``` gpg: RSA/AES256.CFB encrypted for ... ``` What is ``AES256.CFB`` doing here when the key is a RSA key? Isn't the data supposed to be encrypted with RSA given this is public key cryptography?
I am asking it again because no one answered my previous question with more clarity. I have deleted that question One more co-CDH in Type three pairing groups $G_1 \times G_2 \to G_T$: means given a generator $g_2$ in $G_2$, $A = g_2^a$ with random $a$ and an oracle $\mathcal{O}$ which which accepts query $Q \in G_1...
Forgive my ignorance, but I've run into some confusion in an AES implementation I'm testing. To the best of my understanding, ECB provides no diffusion, the same plaintext with the same key will yield the same ciphertext every time. That's what makes it so bad for real-world cryptography, but as a programmer, my curren...
Let's say we have a billion short individual json files with same regular structure: ``{"name": "<name>", "id": <id>}``. Each file is individually encrypted with some crypto algorithm (symmetric or asymmetric). The cryptanalyst has all the billion files, and additionally knows public key that generated the billion indi...
Does encrypting billion short similar jsons with known structure makes encryption less secure?
Let's say we have a billion short individual json files with same regular structure: ``{"name": "<name>", "id": <id>}``. Each file is individually encrypted with some crypto algorithm (symmetric or asymmetric). The cryptanalyst has all the billion files, and additionally knows public key that generated the billion indi...
Let's say we have a billion short individual json files with same regular structure: ``{"name": "<name>", "id": <id>}``. Each file is individually encrypted with some crypto algorithm (symmetric or asymmetric). The cryptanalyst has all the billion files, and additionally knows public key that generated the billion indi...
Does encrypting a billion short and similar jsons with known structure make encryption less secure?