instruction
stringlengths
15
30k
Is there a standard I can test a ECDH against?
I understand the only multilinear maps used in cryptography are bilinear maps, and higher arity multilinear maps are not "known." *Why does the composition of bilinear maps not yield usable higher-arity maps?* I thought the primary feature of multilinear maps in cryptography is simply their multilinearity along with ...
Why not compose bilinear maps for higher arity maps?
I implemented below algorithm in hardware and it works fine with first point addition. [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/d83eu.png However, when I continue to perform back-to-back addition, I got the wrong result. The part that I'm not sure here is, 1) The original ...
I implemented below algorithm in hardware and it works fine with first point addition. [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/d83eu.png However, when I continue to perform back-to-back addition, I got the wrong result. The part that I'm not sure here is, 1) The original ...
Assume a given pseudo-random function $H:\{0,1\}^a\mapsto\{0,1\}^b$ with $b\in[104,256]$ and $b/2<a<b$. We want to exhibit a collision if there is one, which has probability $>63\%$. We are ready to perform $2^{b/2+1}$ evaluations of $H$ or slightly more, distributed among several search units. But we don't have $2^...
Assume a given pseudo-random function $H:\{0,1\}^a\mapsto\{0,1\}^b$ with $b\in[104,256]$ and $b/2<a<b$. We want to exhibit a collision if there is one, which has probability $>63\%$. We are ready to perform $2^{b/2+1}$ evaluations of $H$ or slightly more, distributed among several search units. But we don't have $2^...
Assume a given pseudo-random function $H:\{0,1\}^a\mapsto\{0,1\}^b$ with $b\in[104,256]$ and $b/2<a<b$. We want to exhibit a collision if there is one, which has probability $>63\%$. We are ready to perform $2^{b/2+1}$ evaluations of $H$ or slightly more, distributed among several search units. But we don't have $2^...
When trying to implement ElGamal Public Key Encryption using Hyperelliptic Curves, one needs to map the message that will be encrypted to a valid Divisor (in my case in the Mumford representation, which is the most common). I have not found any specific methods similar to Koblitz encodings in ECC. Are there any met...
What would be the method of choice to compute the private key from the public key on a baby analog of secp256k1, say with $p$ and $n$ 144-bit? What would be the pros and cons of [Pollard's rho][1] and [Pollard's kangaroo][2] ? How can the special properties of a Koblitz curve be put to use? [1]: https://en...
I wanna do an experiment. I wanna see if it's possible to sign in to an outdated website that still uses MD5 to store passwords (there are surprisingly still a lot) with two different passwords. For example "Password123" must have another string that produces the same hash value. I've found a few examples online of...
Assume a given pseudo-random function $H:\{0,1\}^a\mapsto\{0,1\}^b$ with $b\in[104,256]$ and $b/2<a<b$. We want to exhibit a collision if there is one, which has probability $>63\%$. We are ready to perform $2^{b/2+1}$ evaluations of $H$ or slightly more, distributed among several search units. But we don't have $2^...
[fgrieu][1] has shown that $\lim\limits_{h\to\infty} H(h,k) = k$ for any fixed $k$, so I will try to address the second question, that is, whether or not $$\lim\limits_{h\to\infty} h - H(2h,h) = 0$$ In particular, if we let $n = 2^h$, then we are asking whether $$\lim\limits_{n\to\infty} \lg(n) - n\sum_{j=0}^{n^2}\bi...
A NIST P-256 secret key (for ECDH or ECDSA) represents any scalar modulo $\ell$ for $$\ell = 2^{256} - 2^{224} + 2^{192} - 89188191075325690597107910205041859247,$$ whereas an X25519 secret key represents an integer multiple of 8 between $2^{254}$ and $2^{255}$, interpreted as a scalar modulo $8 p_1$ for $$p_1 = 2^{252...
This [recent paper](https://eprint.iacr.org/2023/539.pdf) shows that discrete logarithms are solvable if you have an oracle for the Diffie–Hellman problem. However, to me, it seems there is a much simpler reduction and I wonder where I am wrong: **Core idea**: A DH oracle allows us to exploit the _multiplicative_ st...
Assume a given pseudo-random function $H:\{0,1\}^a\mapsto\{0,1\}^b$ with $b\in[104,256]$ and $b/2<a<b$. We want to exhibit a collision if there is one, which has probability $>63\%$. We are ready to perform $2^{b/2+1}$ evaluations of $H$ or slightly more, distributed among several search units. But we don't have $2^...
I have a same question, because finally the equations for calculation of SK, SK = KDF (DH1 | | DH2 | | DH3 | | DH4). For replacing the original DH1 = DH(Alice identity key, Bob signed prekey) with DH1 = DH(Alice identity key, Bob identity key) should be able to deduce the shared key SK just as well. Here the protoco...
Our device comes with a device certificate which was signed with our private registration authority (CA). The private key (type ECC) was generated on the device itself - to be more specific directly on the on-board TPM. The public key is included inside the device certificate. Now we have a use-case where we want to...
Assume a given pseudo-random function $H:\{0,1\}^a\mapsto\{0,1\}^b$ with $b\in[104,256]$ and $b/2<a<b$. We want to exhibit a collision if there is one, which has probability $>63\%$. We are ready to perform $2^{b/2+1}$ evaluations of $H$ or slightly more, distributed among several search units. But we don't have $2^...
For a KEM mechanism like RSA, Kyber, etc. is there it usually worth doing key trapping/key encapsulation both directions in a key exchange? By this I mean: Alice wraps a symmetric key and sends it to Bob. Bob wraps a different symmetric key and sends it to Alice. They both then run the concatenation of these two keys i...
Two way key transport?
I asked an AI the following question: "*can you provide me with random numbers of 30 digits in length?*" And then the AI has generated these numbers for me. 563958422461839604397274590248 743298571529845197630149526734 962345019834590239458293827563 841259630492576302945836184025 129458392...
Can AI generate random numbers?
I have a theoretical question about the probability of collisions of hashes versus random numbers. I'm not interested in the exact probabilities. The exact hash function is not relevant (we can assume it is perfectly uniform, cryptographically strong, etc.). The implementation of the random number generator is also not...
> 1. If I have some pool of _inputM_ values of length `M` bits (where `M` is half of `N`) that are known to be unique, does a hash of _inputM_ `hashN(inputM)` producing an N-bit hash have lower probability of collision than producing a random number of N bits `randN()`? Nope; under the assumptions stated, they are p...
(Sorry for a newbie question) In ECC the intent is to create a group of a prime order (or prime multiplied by a relatively small cofactor). I know there's an algorithm for ECC to count the number of elements. My question is: how is it known that the group order is indeed prime? AFAIK there're no known deterministic...
> Or in particular case of this number it was possible to prove its primality? I'll try to place this in the context of the 1990's, when the curves were created; at that time, algorithms such as AKS and ECPP were unknown. I don't believe Certicom has published what criteria they used to assess primality. Howev...
> Or in particular case of this number it was possible to prove its primality? I'll try to place this in the context of the 1990's, when the curves were created; at that time, algorithms such as AKS were unknown. I don't believe Certicom has published what criteria they used to assess primality. However, what ...
> Or in particular case of this number it was possible to prove its primality? I'll try to place this in the context of the 1990's, when the curves were created; at that time, algorithms such as AKS were unknown. I don't believe Certicom has published what criteria they used to assess primality. However, what ...
The use case here is to deterministically generate a multi-use wallet from a single 12-word BIP39 mnemonic. Currently a standard process for deriving secp256k1 keypairs is implemented, e.g., using a derivation path like `m/44'/60'/0'/0/x` for an arbitrary x (0, 1...) to derive keypairs, which include a 32 byte/256 bit...
Should you hash the salt on its own ? Is that possible? for example being password with salt appended at the end hash(pass || salt) and hash(salt) in a password file?
Is hashing salt possible even with the password with salt appended to the end?
The idea of verification using certificates is that a trust path is build towards a trust anchor - usually also just a certificate. The trust anchor may also be linked to some additional name constraints for the underlying certificates. Trust path (certificate chain) validation [is listed in the X.509 specifications](h...
I have a pytorch model that generates bond trade pairs that have a high probability of reverting to the mean in a 30 day time period. I want to sell the signals but I do not want them to be redistributed. Is their a way that I can encrypt my data signals if I put them on a marketplace like Amazon Data Exchange or Sn...
Does anyone know of how I would authenticate the data my algorithm generates?
I have a pytorch model that generates bond trade pairs that have a high probability of reverting to the mean in a 30 day time period. I want to sell the signals, but I do not want them to be redistributed. Is there a way to encrypt my data signals, if I put them on a marketplace like Amazon Data Exchange or Snowflak...
I have a pytorch model that generates bond trade pairs that have a high probability of reverting to the mean in a 30 day time period. I want to sell the signals, but I do not want them to be redistributed. Is there a way to encrypt my data signals, if I put them on a marketplace like Amazon Data Exchange or Snowflak...
This is the problem Let $\mathcal{L}$ be a lattice and $v_1,v_2,\ldots,v_n\notin\mathcal{L}$. Given the values $a_1,\ldots,a_n$ such that $$a_1=\lfloor v_1\rceil+v_2+\ldots+v_n$$ $$a_2=v_1+\lfloor v_2\rceil+\ldots+v_n$$ $$\vdots$$ $$a_n=v_1+v_2+\ldots+\lfloor v_n\rceil$$ where $\lfloor\cdot\rceil$ means pro...
I asked an AI the following question: > Can you provide me with random numbers of 30 digits in length? And then the AI has generated these numbers for me. 563958422461839604397274590248 743298571529845197630149526734 962345019834590239458293827563 841259630492576302945836184025 1294583926...
Did the AI generate these random numbers?
I asked an AI the following question: > Can you provide me with random numbers of 30 digits in length? And then the AI has generated these numbers for me. 563958422461839604397274590248 743298571529845197630149526734 962345019834590239458293827563 841259630492576302945836184025 1294583926...
Can an AI really generate random numbers?
I'm trying to understand the exploitability of the padding oracle attack, which enables someone to decrypt and encrypt the contents without knowing the encryption key. > Can ***encrypted data*** with ***the first block***, be ***decrypted*** by the app that relies on a ***static IV*** without knowing the ***IV***? ...
> Can encrypted data with the first block, be decrypted by the app that > relies on a static IV without knowing the IV? No. To decrypt the first block of ciphertext, you must know the IV. See the diagram below (coped from [Wikipedia](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation)) which shows how A...
> Can encrypted data with the first block, be decrypted by the app that > relies on a static IV without knowing the IV? No. To decrypt the first block of ciphertext, you must know the IV. See the diagram below (coped from [Wikipedia](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation)) which shows how A...
Yes, you got the scheme essentially right - except that the group cannot be $\mathbb{Z}_p^*$, as the latter does not have prime order. It can however be many other things - like the multiplicative subgroup of squares over $\mathbb{Z}_p^*$, or an elliptic curve. Let us simply consider the scheme as you described it, ove...
The use case here is to deterministically generate a multi-use wallet from a single 12-word BIP39 mnemonic. Currently a standard process for deriving secp256k1 keypairs is implemented, e.g., using a derivation path like `m/44'/60'/0'/0/x` for an arbitrary x (0, 1...) to derive keypairs, which include a 32 byte/256 bit...
The implementation of Shamir secret sharing in this code, only generates the original image if the shares are provided in consecutive order (ex: [2,3,4]) and won't work in any other share order (ex: [2,4,6] or [4,1,3]). However, Shamir secret reconstruction does not require the shares to be in any order, then why does ...
Why does Shamir secret sharing appear to need ordered shares?
The shares are really pairs $(x_i,f(x_i))$ where $x_i$ is the coordinate and $f(x_i)$ is its evaluation under the lagrange interpolation polynomial. Most likely your lists are $[f(x_i): 1\leq i\leq 3]$ with some standard point coordinates $[x_i:1\leq i\leq 3]$ assumed. In that sense, order does matter. Pixels in an ...
The implementation of Shamir secret sharing in this code, only generates the original image if the shares are provided in consecutive order (ex: [2,3,4]) and won't work in any other share order (ex: [2,4,6] or [4,1,3]). However, Shamir secret reconstruction does not require the shares to be in any order, then why does ...
The shares are really pairs $(x_i,f(x_i))$ where $x_i$ is the coordinate and $f(x_i)$ is its evaluation under the lagrange interpolation polynomial. Most likely your lists are $[f(x_i): 1\leq i\leq 3]$ with some standard point coordinates $[x_i:1\leq i\leq 3]$ assumed. In that sense, order does matter. Pixels in an ...
> However, Shamir secret reconstruction does not require the shares to be in any order, then why does this fail? Well, Shamir's secret sharing works in a finite field; in your code, you use the field $Z/251$ (which is a valid field). However, in your reconstruction code, you have the line: pt *= po...
[fgrieu][1] has shown that $\lim\limits_{h\to\infty} H(h,k) = k$ for any fixed $k$, so I will try to address the second question, that is, whether or not $$\lim\limits_{h\to\infty} h - H(2h,h) = 0$$ In particular, if we let $n = 2^h$, then we are asking whether $$\lim\limits_{n\to\infty} \lg(n) - n\sum_{j=0}^{n^2}\bi...
[fgrieu][1] has shown that $\lim\limits_{h\to\infty} H(h,k) = k$ for any fixed $k$, so I will try to address the second question, that is, whether or not $$\lim\limits_{h\to\infty} h - H(2h,h) = 0$$ In particular, if we let $n = 2^h$, then we are asking whether $$\lim\limits_{n\to\infty} \lg(n) - n\sum_{j=0}^{n^2}\bi...
[fgrieu][1] has shown that $\lim\limits_{h\to\infty} H(h,k) = k$ for any fixed $k$, so I will try to address the second question, that is, whether or not $$\lim\limits_{h\to\infty} h - H(2h,h) = 0$$ In particular, if we let $n = 2^h$, then we are asking whether $$\lim\limits_{n\to\infty} \lg(n) - n\sum_{j=0}^{n^2}\bi...
[fgrieu][1] has shown that $\lim\limits_{h\to\infty} H(h,k) = k$ for any fixed $k$, so I will try to address the second question, that is, whether or not $$\lim\limits_{h\to\infty} h - H(2h,h) = 0$$ In particular, if we let $n = 2^h$, then we are asking whether $$\lim\limits_{n\to\infty} \lg(n) - n\sum_{j=0}^{n^2}\bi...
I want to wrap a private key out of a HSM, using an external EC key pair (master key) and then verify that I can recover it.<br> The wrapping occurs as follow: 1. *Generate a secret AES key in the HSM*, using the public part of the EC master key, the private part of the internal key pair and derivation mechanism `...
In the paper [Efficient and Secure Pairing-Free Certificateless Aggregate Signature Scheme for Healthcare Wireless Medical Sensor Networks][1], on the signature generation part (Page 5), there is an equation $Y_{2i} = [(y_2x_i + h_{2i}d_i)modq]P_{Pub} = (u_i, v_i)$. How is a group element assigned to two integers? $u...
I need to sign a URL to make sure the URL cannot be tampered or forged. The client has limited capabilities and I cannot use a key which is more than 50 characters long. Generally I use RSA to generate the signature, with keys of the proper size. So I am not sure what technique to use to keep the signature safe en...
In PKCS#11 documentation § 2.1.23 is described how to *wrap and unwrap a target asymmetric key of any length and type using an RSA key*, called `CKM_RSA_AES_KEY_WRAP`. This mechanism could be easily implemented by hand in case it is not available in HSM.<br/> The counterpart exist for EC, `CKM_EC_AES_KEY_WRAP` can *wr...
Is it possible to wrap a RSA private key using a EC key pair?
I need a way to encode a set of information in a way that the result would be as short as possible with a requirement of it being usable as part of URL string. I don't really care that much about security, the encryption is applied mostly for the plain text to not be visible right away. At the same time, just encodi...
Our device comes with a device certificate which was signed with our private registration authority (CA). The private key (type ECC) was generated on the device itself - to be more specific directly on the on-board TPM. The public key is included inside the device certificate. Now we have a use-case where we want to...
I received two distinct outcomes from a single input using SHA3-256 and KECCAK-256: ``` input --> sha3-256 --> output1 input --> keccak-256 --> output2 ``` I want to find ```input2```, which will give me ```output1``` after Keccak-256 hash : ``` input2 --> keccak-256 -> output1 ``` Is it somewhat pos...
Does information about known input&output for SHA3-256 help to find KECCAK-256 input for the same output?
In PKCS#11 documentation § 2.1.23 is described how to *wrap and unwrap a target asymmetric key of any length and type using an RSA key*, called `CKM_RSA_AES_KEY_WRAP`. This mechanism could be easily implemented by hand in case it is not available in HSM. The counterpart exists for EC, `CKM_EC_AES_KEY_WRAP` can *wrap...
I have a question regarding the **internal wiring** of the rotors of the Enigma machine. I'm trying to understand some details about the original Enigma machine. To the best of my understanding, each rotor is nothing but a *monoalphabetic substitution cipher* - except that the rotors can rotate. Yeah. But the rotati...
The below is essentially a comment, but perhaps long for one. There are a number of ways which this problem seems underspecified currently. For example, does one need to *exactly* obtain $\Sigma$, or is *approximately* obtaining it bad as well? One method to approximately obtain it is $$\frac{\sum_i a_i}{n} = \...
I am currently studying the Double Ratchet Algorithm from Signal ([link to the documentation](https://signal.org/docs/specifications/doubleratchet/doubleratchet.pdf)). I stepped over a security issue which I was not able to find that it was mentioned anywhere. I assume that an attacker is able to delay messages at ...
I find it hard to fully grasp the whole [Pinocchio protocol](https://eprint.iacr.org/2013/279.pdf) . I understand that the $\alpha$ s are for restricting the prover to compute only the corresponding set-up values. But it's not clear for me to pick up $\gamma$ for the consistent(same) witness check. From ...
I have found myself in a position where I need to encrypt multiple obecjt (vCards) with AES Counter mode or Galois/Counter Mode using the same key. Now here is the problem the structure of the vCard always starts with predefined values i.e. here is an example from wikipedia BEGIN:VCARD VERSION:4.0 ...
I have found myself in a position where I need to encrypt multiple obecjt (vCards) with AES Counter mode or Galois/Counter Mode using the same key. Now here is the problem the structure of the vCard always starts with predefined values i.e. here is an example from wikipedia BEGIN:VCARD VERSION:4.0 ...
I have found myself in a position where I need to encrypt multiple obecjt (vCards) with AES Counter mode or Galois/Counter Mode using the same key. Now here is the problem the structure of the vCard always starts with predefined values i.e. here is an example from wikipedia BEGIN:VCARD VERSION:4.0 ...
> Could someone tell me if I'm doing right This is generally the way this is performed yes, as IES as explained in your other question. **The internal key pair needs to be ephemeral**, i.e. you'd need to generate a new key pair for each key that is wrapped. This means that it should be a *session key* in the HSM....
I have found myself in a position where I need to encrypt multiple obecjt (vCards) with AES Counter mode or Galois/Counter Mode using the same key. Now here is the problem the structure of the vCard always starts with predefined values i.e. here is an example from wikipedia BEGIN:VCARD VERSION:4.0 ...
This is Dan Boneh's video on PLONK - https://www.youtube.com/watch?v=vxyoPM2m7Yg I went through the video multiple times & also tried to go through the original PLONK paper - https://eprint.iacr.org/2019/953.pdf Boneh's explanation of PLONK involves the steps **1)** Boneh consider's the trace of the equation...
Why does Dan Boneh's video on PLONK not match the PLONK Paper?
This is Dan Boneh's video on PLONK - https://www.youtube.com/watch?v=vxyoPM2m7Yg I went through the video multiple times & also tried to go through the original PLONK paper - https://eprint.iacr.org/2019/953.pdf Boneh's explanation of PLONK involves the steps **1)** Boneh consider's the trace of the equation...
This is Dan Boneh's video on PLONK - https://www.youtube.com/watch?v=vxyoPM2m7Yg I went through the video multiple times & also tried to go through the original PLONK paper - https://eprint.iacr.org/2019/953.pdf Boneh's explanation of PLONK involves the steps **1)** Boneh consider's the trace of the equation...
Where can I find 2 of the steps/proofs described in Dan Boneh's video on PLONK in the PLONK Paper? The 2 don't seem to match
I have found myself in a position where I need to encrypt multiple obecjt (vCards) with AES Counter mode or Galois/Counter Mode using the same key. Now here is the problem the structure of the vCard always starts with predefined values i.e. here is an example from wikipedia BEGIN:VCARD VERSION:4.0 ...
Is there a lossless compression algorithm that has hashing-like properties where there are multiple solutions to it? As in for example, when a 1000-bit data-sequence is compressed into a 500-bit data sequence, there are multiple possible 500-bit data sequences that can be generated as outputs. Each of these 500-bit ...
> Is there a lossless compression algorithm that has hashing-like properties where there are multiple solutions to it? **No**. A lossless compression algorithm can't have two different inputs with the same output, contrary to a hash. In the question, the proposition _"Additionally, upon decompression, any one of ...
> Is there a lossless compression algorithm that has hashing-like properties where there are multiple solutions to it? **No**. A lossless compression algorithm† can't have two different inputs with the same output, contrary to a hash. In the question, the proposition _"Additionally, upon decompression, any one of...
The second moment and fourth moment of $\mathcal{P}(V)$?
I have found myself in a position where I need to encrypt multiple objects (vCards) with AES Counter mode or Galois/Counter Mode using the same key. Now here is the problem the structure of the vCard always starts with predefined values i.e. here is an example from wikipedia BEGIN:VCARD VERSION:4.0 ...
I want to wrap a private key out of a HSM, using an external EC key pair (master key) and then verify that I can recover it.<br> The wrapping occurs as follows: 1. *Generate a secret AES key in the HSM*, using the public part of the EC master key, the private part of the internal key pair and the derivation mechan...
We are planning to organize a workshop with the participation of academicians, engineers and graduate students working in the field of cryptology. On the first day, we are planning a fun competition for the participants as an ice-breaking event. Our goal is to organize a quiz on fun, little-known facts about cryptology...
I hope this story fits: The USA classified cryptography as weapon technology. Thus, it was not allowed to export cryptography knowledge/technology. In general, this was a huge problem, especially when the internet arose. A lot of very interesting people fought to end this classification, e.g. Phil Zimmermann the creato...
I hope this story fits: The USA classified cryptography as weapon technology. Thus, it was not allowed to export cryptography knowledge/technology. In general, this was a huge problem, especially when the internet arose. A lot of very interesting people fought to end this classification, e.g. Phil Zimmermann the creato...
This may be a stupid question but I've been stuck on parsing these definitions for a while. I am reading the paper "On Ideal Lattices and Learning with Errors Over Rings" by Lyubashevsky, Peikert, and Regev. I am trying to understand the error distributions they are proposing. In section 3, they define a set $\math...
Finding a cryptography library to implement various application features is not difficult nowadays, thanks to options like *NaCl, Google Tink, PyCA, and OpenSSL*. However, I've been struggling to find a library that supports **[group signatures][1]**, which is causing confusion. Would anyone be able to provide an exp...
Where is the cryptography library that support group signature?
I am trying to understand STARK with not much math. I understand SNARK like this: Computation → Arithmetic Circuit → R1CS → QAP → zk-SNARK From the helpful article: https://z.cash/technology/zksnarks/ We have a computation with many steps that can prove something. We take that and create an arithmetic circuit (i...
How can we explain STARK with less math?
Suppose we have a standard $\Sigma$-protocol for proving the knowledge of a witness $x$ for the statement $y$. It has an honest-verifier ZK and special soundness. Now we do an unusual modification to get an interactive $\Sigma'$-protocol in ROM: 1. The prover $\mathcal{P}$ compute $a$ exactly like in $\Sigma$-prot...
I am trying NIST SP 800-22 to test the randomness of 128 bit output in AES, but i always get ***igamc: UNDERFLOW*** or ***Segmentation fault (core dumped)*** error. My data file has 128 bit output format, for example as follows: ``` 0110110001000101111101110101001101100000010111100111110001001011101111100101001110...
How to use NIST SP 800-22 to check randomness of 128 bits output in AES?
I'm a dev new to security and cryptography. I'm writing a password manager and Time-based OTP combo in dart/flutter to use in multiple devices and platform for fun and use it personally for real. I have done some reading over google, stackoverflow.com and crypto.stackexchange.com, came up with following skeleton, a...