instruction
stringlengths
15
30k
> Is this approach a good idea? I believe your encryption method is to use Kyber to generate a shared secret (using the decryptor's public key), and send that shared secret through a KDF, and then use the result for some symmetric AEAD. That sounds reasonable; Kyber is "CCA secure", that is, using the same public...
I am trying to prove to myself that an identification scheme derived from a digital signature in a challenge/response manner is secure, based on the security of the digital signature scheme. I've found an informal proof in these lecture [notes](http://www.cs.umd.edu/~jkatz/gradcrypto2/NOTES/lecture25.pdf), but I'm stru...
I am trying to prove to myself that an identification scheme derived from a digital signature in a challenge/response manner is secure, based on the security of the digital signature scheme. I've found an informal proof in these lecture [notes](http://www.cs.umd.edu/~jkatz/gradcrypto2/NOTES/lecture25.pdf), but I'm stru...
I am using ECDSA P-384 for signing and verifying messages. The messages are basically stringified JSON. After receiving, the recipient verifies the signature using the public key. Should the public key be included inside the message (aka the JSON which gets stringified)? Or should I send the public key separately a...
When using ECDSA P-384 for signing and verifying messages, should the public key be also included **INSIDE** the message before signing?
Consider the following definition. Let $p(n) > n$ be a polynomial, and $G_n: \{0, 1\}^n \rightarrow \{0, 1\}^{p(n)}$ a PRG. Moreover, given $x \leftarrow \{0, 1\}^n$, we say $S$ is a *length $n-1$ contiguous substring of* $G(x)$ if $S = s_0\cdots s_{n-2}$ with $s_i \in \{0, 1\}$ is a contiguous substring of $G(x)$. ...
Suppose it is an Army Enigma I. Choose reflector UKW-B or UKW-C. Choose three rotors from I, II, III, IV and V. For each of the 120 reflector/rotors permutations, there are 17,576 starting indicator positions to test. Menu ---- Ciphertext $\tt RRHKJ \ KNJXE \ UWNFO \ T$ has 16 characters. Crib $\tt WETTE \ RVORH...
Suppose it is an Army Enigma I. Choose reflector UKW-B or UKW-C. Choose three rotors from I, II, III, IV and V. For each of the 120 reflector/rotors permutations, there are 17,576 starting indicator positions to test. Menu ---- Ciphertext $\tt RRHKJ \ KNJXE \ UWNFO \ T$ has 16 characters. Crib $\tt WETTE \ RVORH...
I am using ECDSA P-384 for signing and verifying messages. The messages are basically stringified JSON. After receiving, the recipient verifies the signature using the public key. Should the public key be included inside the message (aka the JSON which gets stringified)? Or should I send the public key separately a...
> Unfortunately the above documentation is more focused on its > properties and usage instead of how this construct works. libsodium's *secretstream* is defined in the [documentation][1], although I will admit that some of the notation looks a bit confusing. As a summary: 1. Like XChaCha20, it uses HChaCha20 to ...
Leaving the JSON formatting aside, the question considers a server receiving public key $\mathrm{pk}$, an ECDSA signature $S$, and message $M$; and asks if the signature should be on $M$ or $\mathrm{pk}\|M$. In either case, and contrary to standard practice, the server has no way to authenticate $\mathrm{pk}$; it on...
Leaving the JSON formatting aside, the question considers a server receiving public key $\mathrm{pk}$, an ECDSA signature $S$, and message $M$; and asks if the signature should be on $M$ or $\mathrm{pk}\|M$. In either case, and contrary to standard practice, the server has no way to authenticate $\mathrm{pk}$; it on...
Leaving the JSON formatting aside, the question considers a server receiving public key $\mathrm{pk}$, an ECDSA signature $S$, and message $M$; and asks if the signature should be on $M$ or $\mathrm{pk}\|M$. In either case, and contrary to standard practice, the server has no way to authenticate $\mathrm{pk}$; it on...
Leaving the JSON formatting aside, the question considers a server receiving public key $\mathrm{pk}$, an ECDSA signature $S$, and message $M$; and asks if the signature should be on $M$ or $\mathrm{pk}\|M$. In either case, and contrary to standard practice, the server has no way to authenticate $\mathrm{pk}$; it on...
Leaving the JSON formatting aside, the question considers a server receiving public key $\mathrm{pk}$, an ECDSA signature $S$, and message $M$; and asks if the signature should be on $M$ or $\mathrm{pk}\|M$. In either case, and contrary to standard practice, the server has no way to authenticate $\mathrm{pk}$; it on...
Several years ago, there was an [unenforced constraint on verification in the cirmcomlib library](https://github.com/iden3/circomlib/commit/109cdf40567fce284dca1d535819ce28922653e0#diff-d115e3788e56ac3d62b1f243561d50e5) : a tool for building projects using ZsNarks. The error allowed to forge cryptographic nullifiers/pr...
Suppose it is an Army Enigma I. Choose reflector UKW-B or UKW-C. Choose three rotors from I, II, III, IV and V. For each of the 120 reflector/rotors permutations, there are 17,576 starting indicator positions to test. Menu ---- Ciphertext $\tt RRHKJ \ KNJXE \ UWNFO \ T$ has 16 characters. Crib $\tt WETTE \ RVORH...
I have a decentralized coin system that I am trying to develop. Each coin can be split up into 1,000,000 units. I've been looking for a **quantum-safe** and practical (efficient) algorithm to send fractions of a coin between peers, so that other than the two peers that participate in the transaction, nobody could...
I'm researching to see if there is an algorithm the encrypts different things with different keys to product the same output. So let's say I have 2 messages. var message1 = "My password is: Doggies!1" var message2 = "My password is shdhe93-4" And two keys. var key1 = "DummyKey" var key2 ...
> Is there a standardized way to achieve this? That's actually a fairly common request - here's the problem - there's no way to do it without making the ciphertext as long as the two plaintext messages concatinated (after compression). Let us suppose we had a magic box that could take the two plaintext messages a...
Suppose my server receives a message, the public key, and the signature. The message contains a time stamp. Is there a way to get the time stamp from the signature to match it with the message time stamp. Or some other way to ensure the message was signed at the time that it says it was signed? I am using ECDSA P...
Is there a way to get time from signature? Or is it possible to ensure the message was signed at the time that it says it was signed?
Let $r(b, t)$ denote the bitstring $b$ rotated to the left by $t$ bits: for example, $r(00110101, 5) = 10100110.$ Consider the following game. Player A picks two (different) $n$-bit strings $(T_1, T_2)$ and four arbitrary numbers $(a, b, c, d)$ less than $n$. Then Player A computes $$B_1 = r(T_1, a) \oplus r(T_2...
I'm researching to see if there is an algorithm that encrypts different inputs with different keys to produce the same output. So let's say I have 2 messages. var message1 = "My password is: Doggies!1" var message2 = "My password is shdhe93-4" And two keys. var key1 = "DummyKey" var key2...
Let $F = GF(2^n)$ and $P(x) = x^e, P : F \rightarrow F$ be a monomial of degree $e$. How to write each bit of the output of $P$ as a function of input bits? In other words, how to write it as a system of polynomials over $GF(2)$? One way is to use computer algebra systems such as sage and work as follow: ``` sage: ...
I'm working on a Distributed Key Generation protocol. The idea is similar to [this][1]. TLDR: Aggregated Shamir Secret Sharing, each participant acts as a dealer & distributed the secret shares of its secret polynomial to the rest of the participants. Finally, the actual secret can be constructed by aggregating the...
How to redistribute shares for Distributed Shamir Secret Sharing?
I'm working on a Distributed Key Generation protocol. The idea is similar to [this][1]. **TLDR:** Aggregated Shamir Secret Sharing, each participant acts as a dealer & distributed the secret shares of its secret polynomial to the rest of the participants. Finally, the actual secret can be constructed by aggregating...
Why do you want to refresh the shares? Why can't you simply do a new DKG altogether with the updated parameters & distribute the new shares to the participants?
**Considering that** quantum computers *(in theory)* can break\reverse some of one-way-hashes a lot faster than conventional-computers. **Is it technically feasible** in any theoritical *(but realistic)* senarion, to store data "compressed" as in the form of an one-way-hash and reverse\restore\\"decompress" it with the...
> Is it technically feasible in any theoretical (but realistic) scenario, to store data "compressed" as in the form of an one-way-hash and reverse\restore\"decompress" it with the help of a quantum system on demand? **No**. Several messages correspond to a given hash, and even an infinitely powerful computer has no ...
The [python code example on Wikipedia][1] uses the 12th Mersenne Prime (2 ** 127 - 1) as the modulus. I'd like to share a 32 byte secret. Is it safe to simply change the modulus to p = (2 ** 256 + 297)? [1]: https://en.wikipedia.org/wiki/Shamir%27s_secret_sharing#Python_code
Is (2^256 + 297) safe to use as modulus in Shamir Secret Sharing?
> Is it safe to simply change the modulus to p = (2 ** 256 + 297)? Shamir Secret Sharing can be safely done over any finite field, which includes any prime field (that is, where addition and multiplication are done modulo a prime). $2^{256}+297$ is prime, and so using it as the modulus is safe. One minor word ...
> Is it safe to simply change the modulus to p = (2 ** 256 + 297)? Shamir Secret Sharing can be safely done over any finite field, which includes any prime field (that is, where addition and multiplication are done modulo a prime). $2^{256}+297$ is prime, and so using it as the modulus is safe. One minor word ...
TLS 1.3 specify two [pre-shared key exchange modes](https://datatracker.ietf.org/doc/html/rfc8446#section-4.2.9), which are `psk_ke` and `psk_dhe_ke`. The former is a non-ephemeral key exchange where the master secret is basically derived from the pre-shared key, the client random and the server random; whereas the lat...
For TLS-PSK (pre-shared key), should non-ephemeral key exchange be preferred over ephemeral one?
I am trying to understand the conditions necessary for one of the Bletchley Park bombes to stop. Let me give an example. I have been experimenting with Enigma machine and bombe simulators to try to understand better how the bombe works. Using a standard three rotor Enigma machine set up as follows: - Rotors ...
How the mimc bug from circomlib was safely exploited to fake the merkle root in the witness in practice?
I am trying to understand the NIST-submissions for post-quantum cryptography a bit better, and I noticed that the submissions from the CRYSTALS-family in particular is based on Module-LWE. I understand that "normal" LWE has huge parameters, and that they went for Ring-LWE in Ideal Lattices over Rings because of the mo...
Why Module-LWE and not Ring-LWE?
My layman's understanding is as follows. Module-LWE is a generalization of Ring-LWE, i.e., if you can solve Module-LWE, then you can also solve Ring-LWE. More specifically, Ring-LWE is Module-LWE with a module of rank 1. However, there is also a reduction in the opposite direction while assuming different modulus pa...
My layman's understanding is as follows. Module-LWE is a generalization of Ring-LWE, i.e., if you can solve Module-LWE, then you can also solve Ring-LWE. More specifically, Ring-LWE is Module-LWE with a module of rank 1. However, there is also a reduction in the opposite direction while assuming different modulus pa...
My layman's understanding is as follows. Module-LWE is a generalization of Ring-LWE, i.e., if you can solve Module-LWE, then you can also solve Ring-LWE. More specifically, Ring-LWE is Module-LWE with a module of rank 1. However, there is also a reduction in the opposite direction while assuming different modulus pa...
One reason is to have scalable security without having to change the underlying algebra; just increase the module dimension and work with the same base ring. E.g. Kyber can choose a small base ring with good-enough roots of unity for NTT and then scale the dimension to increase complexity/security. Another reason i...
I was reading Vitalik Buterin's post$^\color{magenta}{\star}$ on ZK-snarks and I need some clarification on some points. Since there aren't that many posts and articles on the subject, I had no choice other than turning to Stack Exchange . First, I need to know what does Vitalik means by the following. > There i...
The Pedersen hash is a low constraints friendly hash for Zk-Snarks. Unlike many algorithms, the Pedersen hash returns a point `P = (x,y)` on a curve as a hash. **Depending on the selected curve**, there can exist a fast deterministic way to compute a different input that yields `−P=(x,−y)` using the Weierstrass form...
Pedersen Hash : when truncating the hash to only the X coordinate, is it possible to compute a collision when the jubjub curve is used?
In a similar anonymous PKE based on D-H key exchange, in a many-to-one (one-to-many) case, is there any way to implement authentication without revealing the identity of the sender (receiver)? Could you recommend some papers?
It is DTLS 1.2 version question of [this][1] question. I know from 4.1.2.4. of RFC 5246 (DTLS 1.2) AEAD Ciphers can be used in DTLS 1.2 exactly the same with TLS 1.2. In TLS 1.2 > AAD = seq_num + TLSCompressed.type + TLSCompressed.version + > TLSCompressed.length It makes sense since it is (implicit) se...
DTLS 1.2 Cipher Suites With AES-GCM – What data (if any) is passed to the AES-GCM cipher as the Additional Authentication Data?
Pedersen Hash : when truncating the hash to keep only the X coordinate, is it possible to compute a collision when the jubjub curve is used?
Given a certificate **.12** I want to extract the public key, the private key and Module and Exponent both from the public key and from the private key. I am using PHP and OpenSSL functions As I understand it, the Module and Exponent of the public key must be different from the Module and Exponent of the private ...
Why the Module and Exponent of the public key and the private key are the same?
Given a certificate **.p12** I want to extract the public key, the private key and Module and Exponent both from the public key and from the private key. I am using PHP and OpenSSL functions As I understand it, the Module and Exponent of the public key must be different from the Module and Exponent of the private...
Given a certificate **.p12** I want to extract the public key, the private key and Modulus and Exponent both from the public key and from the private key. I am using PHP and OpenSSL functions As I understand it, the Module and Exponent of the public key must be different from the Module and Exponent of the privat...
Why the Modulus and Exponent of the public key and the private key are the same?
I am interested in creating a cryptocurrency that keeps the sender, the receiver and the amount private and does not require a trusted setup. <ul> <li>I have already read the <a href="http://zerocash-project.org/media/pdf/zerocash-extended-20140518.pdf">Zerocash</a> protocol but It uses zk-SNARKs which require truste...
Let's say I want to perform addition on "small" numbers (if it matters, let's say integers between 1-10K) without decrypting the numbers -- i.e. I have `E(A)` (the encryption of A in a crypto system under a given key) and `E(B)` and I want to compute `E(A+B)` without decrypting `A` or `B`. The state of the art would...
I have following simple function uint128_t crypto_aes_prf( ECB_Mode< AES >::Encryption& e, int message) { // Encrypt the input using AES unsigned char messageBytes[16]= {0}; unsigned char ciphertext[16] = {0}; std::memcpy(messageBytes, &message, sizeof(message)); e.P...
I recently looked into the subject of public key cryptography (especially with X.509 certificates). I am the administrator of a web server in using HTTPS which uses 2 levels of certificates (in addition to the end-user certificate for the website). Here is the schema : [![enter image description here][1]][1] ...
I recently looked into the subject of public key cryptography (especially with X.509 certificates). I am the administrator of a web server in using HTTPS which uses 2 levels of certificates (in addition to the end-user certificate for the website). Here is the schema : [![enter image description here][1]][1] ...
I recently looked into the subject of public key cryptography (especially with X.509 certificates). I am the administrator of a web server in using HTTPS which uses 2 levels of certificates (in addition to the end-user certificate for the website). Here is the schema : [![enter image description here][1]][1] ...
I recently looked into the subject of public key cryptography (especially with X.509 certificates). I am the administrator of a web server using HTTPS which uses 2 levels of certificates (in addition to the end-user certificate for the website). Here is the schema : [![enter image description here][1]][1] [1]...
The [python code example on Wikipedia][1] uses the 12th Mersenne Prime ($2 ^ {127} - 1$) as the modulus. I'd like to share a 32 byte secret. Is it safe to simply change the modulus to p = $2 ^ {256} + 297$? [1]: https://en.wikipedia.org/wiki/Shamir%27s_secret_sharing#Python_code
Is ($2^{256} + 297$) safe to use as modulus in Shamir Secret Sharing?
From the [Rumba20 webpage][1]: > Rumba20 is not designed to provide unpredictability, truncated collision resistance, etc. These features must be provided by an appropriate output filter. Rumba20's goal is to efficiently compress a long input so that only a small amount of data has to be handled by the output filter...
[Rumba20][1] is a compression function that maps a 192-byte (1536-bit) string to a 64-byte (512-bit) string. It's designed to provide collision resistance by using Salsa20 (or ChaCha20) [with][2] the feedforward. However, from the [Rumba20 webpage][1]: > Rumba20 is not designed to provide unpredictability, trunca...
Is anyone aware of the source for a technique that incorporates external wire values into Garbled Circuits? I have come across this technique, which can be found `here https://homes.esat.kuleuven.be/~nsmart/FHE-MPC/Yao.pdf`. However, I was unable to locate the primary reference for it. The purpose of this technique ...
I'm currently confused about the distinctions between two-party computation (2-PC), secure function evaluation, and private function evaluation. Additionally, I came across the term secure circuit evaluation, which has further added to my confusion. If these concepts are essentially the same, then why are they referred...
[Rumba20][1] is a compression function that maps a 192-byte (1536-bit) string to a 64-byte (512-bit) string. It's designed to provide collision resistance by using Salsa20 (or ChaCha20) [with][2] the feedforward. However, from the [Rumba20 webpage][1]: > Rumba20 is not designed to provide unpredictability, trunca...
I am currently studying a course in cryptography, and I have this exercise about OWF. [![enter image description here][1]][1] [![enter image description here][2]][2] I'm failing to prove that this is an inverter to f. Am I in the right direction at all? Thank you! [1]: https://i.stack.imgur.com/klJ7t....
Is it One Way Function?
That PDF uses the expression "external value" to refer to a particular bit in the wire label that is used for the "point-and-permute" technique. In [this video](https://youtu.be/FTxh908u9y8?t=828) I call them "color bits". The technique originated in [Beaver-Micali-Rogaway 1990](https://dl.acm.org/doi/pdf/10.1145/10021...
Assume $g$ is not an OWF. What does it mean for $g$? How can this knowledge about $g$ help You find a preimage of $f$? What does it mean about $f$ being OWP?
What is the probability that the $x$ you got ( from your reduction ) is the correct pre-image of $y$ with $f$? I.e., $\Pr[f^{-1}(y) = x]$?
Is anyone aware of the source for a technique that incorporates external wire values into Garbled Circuits? I have come across this technique, which can be found [here](https://homes.esat.kuleuven.be/~nsmart/FHE-MPC/Yao.pdf). However, I was unable to locate the primary reference for it. The purpose of this technique...
I have a question regarding understanding representation of length in AES-GCM while doing padding for the IV to calculate ICB/J0. In the aes GCM test vectors [testcase5][1] I see the IV is of length 8 bytes as follows: > IV cafebabefacedbad But len({})||len(IV ) is mentioned as > 0000000000000000000000000000...
I believe you are describing [Functional Encryption][1]. I'm not very familiar with the literature, but the linked Wikipedia page and a [search on ePrint](https://eprint.iacr.org/search?q=%22Functional+encryption%22&title=&authors=&category=&submittedafter=&submittedbefore=&revisedafter=&revisedbefore=) might be good s...
Reading about index calculus for discrete logarithm, I noticed that it works for $(\mathbb Z / p \mathbb Z)^*$. Is this the only situation in which it works? If not, please give examples of other situations in which index calculus works to solve discrete log.
When does index calculus work for discrete log?
> 1. What's an appropriate output filter for Rumba20? After coming across [this][1] other question, I discovered the [RFSB paper][2] mentions the following: > To build a full-fledged cryptographic hash function, suitable for use > in message authentication, commitment protocols, etc., we can add any > reasonabl...
How the differential cryptanalysis work?
Is there a standard for LFSRs to test against for use in a stream cipher?
This question may be of no practical interest. But as a meaningful or meaningless question, can we extend the domains of the keyspace, input space and output space of a PRF to be defined over intervals of $\mathbb{R}$? For instance, let $I := (a,b) \subset \mathbb{R}$ be some interval of $\mathbb{R}$, and $F: I\time...
Can we extend the definition of PRF over uncountable infinite sets?
Let's suppose I encrypt an 1MiB plaintext with AES-256 in ECB mode but using different keys for each 16-byte block (I know this is weird but it's just an example). Remembering that it will be used different 256-bits keys for each 128-bits block, so if the adversary wants to break a block, a brute-force in the key sp...
If I encrypt a ciphertext with different keys for each block, will I have the same security of One-time pad?
At a high level, the Uber assumption states that it is not possible to compute(distinguish) linearly independent elements. In the decisional version, the problem is restricted to G_T, but it is unclear whether the linearly independent elements can be from G_1. Here is a simple example: Let be type-3 pairing E: (e...
Let's suppose I take 1MiB of truly random data and split in pieces (seeds) of 32-bytes (256-bits), so I hash each seed with a hash function with the same output digest size (32-bytes/256-bits) and XOR each piece of hashed seeds into a 1MiB plaintext. The random data is kept secret. My question is: Will this sc...
If I hash different seeds with same size of hash output and XOR on plaintext, is it secure as One-time pad?
> Will this scheme have the same security of One-Time Pad? Not in theory, facing an arbitrary powerful adversary. E.g. it's overwhelmingly probable that such an adversary could distinguish among two ciphertexts which is the for the input consisting of the binary expression of $\sqrt[3]/2$, when the other is for the...
> Will this scheme have the same security of One-Time Pad? Not in theory, facing an arbitrary powerful adversary. E.g. it's overwhelmingly probable that such an adversary could distinguish among two ciphertexts which is the for the input consisting of the binary expression of $\sqrt 3/2$, when the other is for the ...
> Will this scheme have the same security of One-Time Pad? Not in theory, facing an arbitrary powerful adversaries. E.g. it's overwhelmingly probable that such an adversaries could distinguish among two ciphertexts which one is for the input consisting of the binary expression of $\sqrt 3/2$, when the other is for t...
> Will this scheme have the same security of One-Time Pad? Not in theory, facing arbitrary powerful adversaries. E.g. it's overwhelmingly probable that such an adversaries could distinguish among two ciphertexts which one is for the input consisting of the binary expression of $\sqrt 3/2$, when the other is for the ...
If I encrypt a plaintext with different keys for each block, will I have the same security of One-time pad?
While XOR is used as simple symetric encryption with arbitrary custom key, what is simple asymetric encryption that use arbitrary custom key? That's mean I expect I can set custom private key or public key (in ASCII format). Expectation: ``` pub = "mypubkey" pri = "myprivkey" msg = "hello world" encrypte...
What is simple asymetric encryption that use arbitrary key?
This is from this video - https://www.youtube.com/watch?v=9VuZvdxFZQo Bob has a list of length $10^6$. Bob wants to convince Alice that every number in the list is between 1 & 10. Alice needs to verify it with just 2 queries & 99% certainty. This is the protocol given by Ben - $f$ is polynomial created by in...
At a high level, the Uber assumption states that it is not possible to compute (distinguish) linearly independent elements. In the decisional version, the problem is restricted to $G_T$, but it is unclear whether the linearly independent elements can be from $G_1$. Here is a simple example: Let be type-3 pairing ...