instruction
stringlengths
15
30k
From the [PLONK paper](https://eprint.iacr.org/2019/953.pdf). Page 23, 6 Constraint System --- The constraint system $C = (V, Q)$ is defined as follows. - $V$ is of the form $V = (a, b, c)$, where $a$, $b$, $c \in [m]^n$. We think of $a$, $b$, $c$ as the left, right and output sequence of $C$ respectively...
From the [PLONK paper](https://eprint.iacr.org/2019/953.pdf). Page 23, 6 Constraint System --- The constraint system $C = (V, Q)$ is defined as follows. - $V$ is of the form $V = (a, b, c)$, where $a$, $b$, $c \in [m]^n$. We think of $a$, $b$, $c$ as the left, right and output sequence of $C$ respectively...
From the [PLONK paper](https://eprint.iacr.org/2019/953.pdf). Page 23, 6 Constraint System --- The constraint system $C = (V, Q)$ is defined as follows. - $V$ is of the form $V = (a, b, c)$, where $a$, $b$, $c \in [m]^n$. We think of $a$, $b$, $c$ as the left, right and output sequence of $C$ respectively...
It's possible to use a hash function as an encipherment scheme if used in counter mode. Let's suppose I take a 64-bytes (512-bits) seed/key and hash it concatenated with counters, and use it as a encipherment scheme. But the hash function has its digest output size of 32-bytes. Some hash function such as Blake2 a...
I know [it's possible with ECDSA](https://crypto.stackexchange.com/questions/18105/how-does-recovering-the-public-key-from-an-ecdsa-signature-work). How bout RSA?
Recently a friend of mine showed me a "puzzle" he created with edwards curve ed25519 It is based on adding and multiplying points on the curve You supply four arguments to the program 1) The 'public key' 2) The 'private key' 3) additional data 4) static point value He considers the puzzle as solved if th...
I have been examining the [Gazelle][1] paper, which focuses on secure inference protocols. One section constructs a Garbled Circuit using inputs cx, sx, and sy to compute the ReLU function in neural networks. Here, sx represents the server's share of the input and cx stands for the client's share of the input data. The...
I have been examining the [Gazelle][1] paper, which focuses on secure inference protocols. One section constructs a Garbled Circuit using inputs cx, sx, and sy to compute the ReLU function in neural networks. Here, sx represents the server's share of the input and cx stands for the client's share of the input data. The...
I have been examining the [Gazelle][1] paper, which focuses on secure inference protocols. One section constructs a Garbled Circuit using inputs cx, sx, and sy to compute the ReLU function in neural networks. Here, sx represents the server's share of the input and cx stands for the client's share of the input data. The...
I have been examining the [Gazelle][1] paper, which focuses on secure inference protocols. One section constructs a Garbled Circuit using inputs cx, sx, and sy to compute the ReLU function in neural networks. Here, sx represents the server's share of the input and cx stands for the client's share of the input data. The...
I have been examining the [Gazelle][1] paper, which focuses on secure inference protocols. One section constructs a Garbled Circuit using inputs cx, sx, and sy to compute the ReLU function in neural networks. Here, sx represents the server's share of the input and cx stands for the client's share of the input data. The...
I am currently taking a course in university where we are working with a KeePass 2 database file. I am still very new to everything which has to do with encryption. First I am going to provide the information which was given to me: > A Keepass 2 database file contains different headers, the important ones are the...
Explanation of KeePass 2 database key calculation?
> If I use this 64-bytes seed with a hash function with a digest output size of 32-bytes, will the security of this encipherment scheme be at most minimal{input,output}? Or will be 512-bits (same size of the seed/key)? Assuming the hash function is indistinguishable from a random function, the security will be the s...
> If I use this 64-bytes seed with a hash function with a digest output size of 32-bytes, will the security of this encipherment scheme be at most minimal{input,output}? Or will be 512-bits (same size of the seed/key)? Assuming the hash function be reasonably be modeled as a random function, the security will be the...
I've came across a Stackexchange question about the <https://crypto.stackexchange.com/questions/99262/chaum-pedersen-protocol> which is based on the generalised schnorr protocol. As I understand it, it uses discrete logs and cyclic groups of prime order q to prove knowledge of a secret value x, which in this scenario i...
0 I have a custom network and I want to implement a symmetric key-exchange and key derivation mechanism with ECDH. I know that I need to use KPP API and ECDH helper functions, but I can't find any code examples in Github or elsewhere (kernel documentation is a bit confusing for me, I'm new to this), so I started ...
Ideally, Hashids -: https://pypi.org/project/hashID/ are considered insecure and it is recommended that we should not use them for any sensitive functions. Though, is a HashId considered secure if we pass a very secure random salt to it? Or will it still be vulnerable? Can someone still guess / reverse engineer the o...
If we supply a random uuid4 hashed salt to Hashid, will it be considered secure?
Does there exist a semi-prime integer $n$ (e.g., an RSA modulus) such that the order of every element in the multiplicative group modulo $n$ is equal to the order of the full group modulo $n$? If so, would such an integer be more resistant to factorization by Shor’s factorization algorithm (the quantum version) than a ...
Are some RSA moduli more resistant than others to Shor's factorization algorithm?
> Does there exist a semi-prime integer $n$ (e.g., an RSA modulus) such that the order of every element in the multiplicative group modulo $n$ is equal to the order of the full group modulo $n$? No, but we can come close; if we gave the product of two distinct safeprimes $n = (2r+1)(2s+1)$ (where $r, s$ are prime), ...
> Does there exist a semi-prime integer $n$ (e.g., an RSA modulus) such that the order of every element in the multiplicative group modulo $n$ is equal to the order of the full group modulo $n$? No, but we can come close; if we gave the product of two distinct safeprimes $n = (2r+1)(2s+1)$ (where $r, s$ are prime), ...
I am trying to wrap my head around Homomorphic encryption, specifically the HEAAN/CKKS scheme. I am reading through the [publication][1], but I am getting stuck on page 11, namely the KeyGen and Enc functions. My issue in understanding comes from the generation of the public key: $$ p.k.\leftarrow (b,a) $$ $$ b...
I have a custom network and I want to implement a symmetric key exchange and key derivation mechanism with ECDH. I know that I need to use KPP API and ECDH helper functions, but I can't find any code examples in Github or elsewhere (kernel documentation is a bit confusing for me, I'm new to this), so I started to th...
Actually, I'm reading the description about Zerologon attack from [the original whitepaper document](https://www.secura.com/pathtoimg.php?id=2055). In there, Tom Tervoort mentions these sentences: >So I tried to come up with some chosen-plaintext attacks myself and figured out something interesting: for 1 in 256 k...
I have a custom network and I want to implement a symmetric key exchange and key derivation mechanism with ECDH. I know that I need to use [KPP API and ECDH helper functions](https://www.kernel.org/doc/html/latest/crypto/api-kpp.html), but I can't find any code examples in Github or elsewhere (kernel documentation i...
Seems alike with the question disscussed in https://eprint.iacr.org/2023/853. It's an usual scenario in the anonymous credential system: > "However, it poses an interesting problem: if the digital credential > is privacy-preserving (e.g. based on BBS+ on CL signatures), but the > holder is still forced to show an ID...
Seems alike with the question disscussed in https://eprint.iacr.org/2023/853. It's an usual scenario in the anonymous credential system: > "However, it poses an interesting problem: if the digital credential > is privacy-preserving (e.g. based on BBS+ on CL signatures), but the > **holder is still forced to show an ...
If I run `cat my.key`, I get: ``` -----BEGIN RSA PRIVATE KEY----- MIIJKQIBAAKCAgEAu+UkIRXNZrdcnuCLsBsz/HiBcYNoAAAhYi2hISKBxkqX165U... ``` but if I run `openssl rsa -in my.key`, I get a different content as: ``` -----BEGIN PRIVATE KEY----- MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQC75SQhFc1mt1ye... ``...
why openssl rsa shows a different content of a certificate?
Can a pseudorandom permutation be used to stretch a pseudorandom generator?
Can a one-way permutation be used to stretch a pseudorandom generator?
I have been examining the [Gazelle][1] paper, which focuses on secure inference protocols. One section constructs a Garbled Circuit using inputs cx, sx, and sy to compute the ReLU function in neural networks. Here, sx represents the server's share of the input and cx stands for the client's share of the input data. The...
If i store sensitive stuff (e.g passwords, salted passwords, Internet protacel adresss(so i know its not tamperd with), private keys(the keys are using a portion of the key on multiple disks in diffrent places for security and i want to make sure there in th write order y storing the hash insecurely(eg on ipfs)) *) *...
The two base64 fragments in the question encode bytes which I show below in hex with spaces inserted to break things per [ASN.1][1], and (for the first fragment corresponding to `my.key`) restore alignment with the second fragment. ~~~ 30820929 020100 0282020...
The two base64 fragments in the question encode bytes which I show below in hex with spaces inserted to break things per [ASN.1][1], and (for the first fragment corresponding to `my.key`) restore alignment with the second fragment. ~~~ 30820929 020100 0282020...
I know how to prove the correct decryption of a (ElGamal) ciphertext. [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/soUjh.png The above protocol is from the paper: Bootle J, Cerulli A, Chaidos P, et al. Short accountable ring signatures based on DDH[C]//European Symposium on Research i...
This question was originally posted in https://ethereum.stackexchange.com/questions/151471/ethereum-signature-as-xml . I post it here aswell because I rarely get any response there. --- I am seeking to express an [EIP 191 0x45 message signature](https://eips.ethereum.org/EIPS/eip-191#version-0x45-e) according to ...
Why should user 1 disclose the resulting random number in addition to disclosing his own seed, <br> when user 2 can compute the resulting random number from the two seeds? That might be safe enough, but it's far from secure. <br> For one thing, each user obtains proof that the "random number" is only pseudorando...
Batch verification is straightforward in this case. Given $n$ signatures $(u_i,v_i,vk_i)$ for $1\le i\le n$, the same $x$ and $z$ value can be used to verify all $n$ signatures, by multiplying together the left and right hand sides of the verification equations thus: $$pk^xA\stackrel ?= g^z$$ $$\left(\prod_i u_i\righ...
Consider a function $G:\{0,1\}^*\to\{0,1\}^*$ with output size double it's input size, that is $\forall x\in\{0,1\}^n,\ |G(x)|=\ell(n)=2n$. Assume $G$ is a PRG in the sense of Jonathan Katz and Yehuda Lindell's [Introduction to Modern Cryptography][1] (3<sup>rd</sup> edition); that is meeting the Pseudorandomness crite...
Consider a function $G:\{0,1\}^*\to\{0,1\}^*$ with output size double it's input size, that is $\forall x\in\{0,1\}^n,\ |G(x)|=\ell(n)=2n$. Assume $G$ is a PRG in the sense of Jonathan Katz and Yehuda Lindell's [Introduction to Modern Cryptography][1] (3<sup>rd</sup> edition); that is meeting the Pseudorandomness crite...
Consider a function $G:\{0,1\}^*\to\{0,1\}^*$ with output size double it's input size, that is $\forall x\in\{0,1\}^n,\ |G(x)|=\ell(n)=2n$. Assume $G$ is a PRG in the sense of Jonathan Katz and Yehuda Lindell's [Introduction to Modern Cryptography][1] (3<sup>rd</sup> edition); that is meeting the Pseudorandomness crite...
If I have TRNG data as input (A1,A2,B1,B2,C1,C2) - can I xor it to provide more TRNG data A,B,C,D,E,F,G,H ? A1 = TRNG1 A2 = TRNG2 B1 = TRNG3 B2 = TRNG4 C1 = TRNG5 C2 = TRNG6 A = A1 ⊕ A2 B = B1 ⊕ B2 C = C1 ⊕ C2 D = A2 ⊕ B1 E = B2 ⊕ C1 F = A1 ⊕ B2 G = ...
XOR for more TRNG data?
> Some exchanges use the signature generated by hashing the payload with the private key. About right: typically the a signature of a payload is generated by hashing the payload, then processing the hash and the private key to form the signature. The signature can then be verified against the public key (assumed aut...
> Some exchanges use the signature generated by hashing the payload with the private key. About right: typically the a signature of a payload is generated by hashing the payload, then processing the hash and the private key to form the signature. The signature can then be verified against the public key (assumed aut...
> Some exchanges use the signature generated by hashing the payload with the private key. About right: typically the a signature of a payload is generated by hashing the payload, then processing the hash and the private key to form the signature. The signature can then be verified against the public key (assumed aut...
> Some exchanges use the signature generated by hashing the payload with the private key. About right: typically the a signature of a payload is generated by hashing the payload, then processing the hash and the private key to form the signature. The signature can then be verified against the public key (assumed aut...
> Some exchanges use the signature generated by hashing the payload with the private key. About right: typically the a signature of a payload is generated by hashing the payload, then processing the hash and the private key to form the signature. The signature can then be verified against the public key (assumed aut...
My problem is about this paper ***Efficient k-out-of-n oblivious transfer scheme with the ideal communication cost*** https://www.sciencedirect.com/science/article/pii/S0304397517309143 I don't know what is the "efficient algorithm" in section 3, paragraph 2, the second sentence of this paper. Could you give m...
I think what you are trying to build is a Pseudo Random Generator PRG. I usually define them with the expansion property. The expansion means, that given a small amount of random numbers you can securely generate a bigger amount of random numbers. Next we need to find your setup, what does an adversary see? If he on...
I am investigating a PRNG which fails some of NIST tests (FFT, ApproximateEntropy and Serial). If such a generator is used in cryptography for any purpose, what consequences can it has? How this vulnerability affects its safety? What is possible attack? I want to discuss implications.
> a PRNG which fails some of NIST tests (FFT, ApproximateEntropy and Serial) Assuming other tests pass, that fact taken in isolation has no practical consequence for most applications, which really are quite tolerant to generators with a slight defect unrelated to what the application does. That includes use for key...
> a PRNG which fails some of NIST tests (FFT, ApproximateEntropy and Serial) Assuming other tests pass, that fact taken in isolation has no practical consequence for most applications, which really are quite tolerant to generators with a slight defect unrelated to what the application does. That includes use for key...
How to extract a private key from .PFX file to .PEM file using AES-GCM as a password-based encryption?
NIST 800-90C defines 3 classes of random bit generation (RBG) constructions: RBG1, RBG2 and RBG3. All constructions must include a DRBG from NIST SP 800-90A. The particular construction in question is RBG3, which is "designed to provide output with a security strength equal to the requested length of its output by prod...
Why does NIST SP 800-90C RBG3 construction require XOR or reseeding a DRBG with a physical entropy sourc to produce full entropy?
Why does NIST SP 800-90C RBG3 construction require XOR or reseeding a DRBG with a physical entropy source to produce full entropy?
> Why does this recommendation require a RBG3 construction based on some physical entropy source to use a DRBG that is XOR'd or re-seeded by the entropy source to produce full entropy? Remember that RGB3 is designed for the ultraparanoid types, who ask if 1,000,000 random bits, want each of the $2^{1000000}$ possibl...
I am trying to test my server program which implements TLS 1.3 connection - it should establish TLS 1.3 connection.<br/> My server uses a self-signed certificate, created in `openssl`.<br/> I am using Firefox v.112 as the client to connect and getting an error - `"SSL_ERROR_RX_MALFORMED_HELLO_RETRY_REQUEST"`. How ca...
How to require possession of arbitrary data to decrypt a file?
If I have TRNG data as input (A1,A2,B1,B2,C1,C2) - can I xor it to provide more TRNG data A,B,C,D,E,F,G,H ? A1 = TRNG1 A2 = TRNG2 B1 = TRNG3 B2 = TRNG4 C1 = TRNG5 C2 = TRNG6 A = A1 ⊕ A2 B = B1 ⊕ B2 C = C1 ⊕ C2 D = A2 ⊕ B1 E = B2 ⊕ C1 F = A1 ⊕ B2 G = ...
I do not know why the intermediate value (for example, W5, W6) should be encrypted?? I think the encryption (random value) only needs in the input process (e.g. w1, w2, w3, w4). [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/zJABP.png
why the intermediate labed value should be encrypted in Garbled Circuits?
U= 115792089237316195423570985008687907852598652813156864395638497411212089444244 a = 20412485227 E1 = EllipticCurve(GF(p), [0,1]) with order U E11 = EllipticCurve(GF(p), [0,1]) with order a Formula from Coords on E1 to Coords on E11 is Q11 = (U/a) * (x,y) :: (x,y) on E1 But,What is the reverse formul...
A HRNG that is NIST 800-90 compliant *must* use a DRBG in some way regardless of whether it adheres to a RBG1, RBG2 RBG3(XOR), or RBG3(RS) construction. This violates the requirement that the OTP is truly random (since there is a DRBG involved). Therefore, it is true that a NIST 800-90 compliant device *cannot* be used...
A HRNG that is NIST 800-90 compliant is not suitable for use for OTP generation right?
U= 115792089237316195423570985008687907852598652813156864395638497411212089444244 a = 20412485227 E1 = EllipticCurve(GF(p), [0,1]) with order U E11 = EllipticCurve(GF(p), [0,1]) with order a Formula from Coords on E1 to Coords on E11 is Q11 = (U/a) * (x,y) (x,y) on E1 But,What is the reverse formula...
> Is my understanding correct? Not quite. For an RBG1 or an RBG2 (either flavor), it is correct (unless the RBG2 was reseeded extremely often, that is, effectively turning it into an RBG3(RS); see below for that case) - those are based in computational complexity assumptions and a computationally unbounded advers...
If we know the RSA encryption of messages m, m+1, m+2 when c=3, how can we compute m in polynomial time?
> Is my understanding correct? Not quite. For an RBG1 or an RBG2 (either flavor), it is correct (unless the RBG2 was reseeded extremely often, that is, effectively turning it into an RBG3(RS); see below for that case) - those are based in computational complexity assumptions and a computationally unbounded advers...
I wanna generate a list of numbers based on a unique string. They shouldn't be predicatble and every time to generate they are the same. Could someone help me pleeease :)?
This question was originally posted in https://ethereum.stackexchange.com/questions/151471/ethereum-signature-as-xml . I post it here aswell because I rarely get any response there. --- I am seeking to express an [EIP 191 0x45 message signature](https://eips.ethereum.org/EIPS/eip-191#version-0x45-e) according to ...
How to know details of generating keying material in openssl library?
This is what we're all talking about:- [![enter image description here][1]][1] On the face of it, The (D)eterministic (R)andom (B)it (G)enerator is just there to mask a failure of the entropy source. If the pink blob is working, the DRBG (blue blob) is entirely irrelevant (unless manipulated by a...
- U= 115792089237316195423570985008687907852598652813156864395638497411212089444244 - a = 20412485227 - E1 = EllipticCurve(GF(p), [0,1]) with order U - E11 = EllipticCurve(GF(p), [0,1]) with order a Formula from Coords on E1 to Coords on E11 is ` Q11 = (U/a) * (x,y) (x,y) on E1` But, what is the re...
Diffie-Hellman key exchange is sometimes informally said to be hard under the discrete logarithm assumption in the chosen group. But if I am reading literature correctly, it actually uses a stronger assumption on the group and that's the assumption of Decisional Diffie-Hellman. Is there a key exchange whose SK-securit...
I want to perform a modular reduction using Solinas prime value as q = 2383233+1. How can I efficiently compute it taking advantage of q being Solinas prime?
I want to perform a modular reduction using Solinas prime value as q = 2^383-2^33+1. How can I efficiently compute it taking advantage of q being Solinas prime?
From the [PLONK paper](https://eprint.iacr.org/2019/953.pdf). Page 29, Round 3 [![Quotient Polynomial][1]][1] Why multiply z(x) and z(Xw) in the quotient polynomial? (why does internal wiring have to multiply input permutation) Why the second term have to "shift by w"? My observation is: 1. These 2 lines...
Consider the weaker IND-CPA case. "Textbook RSA" is not CPA-secure since it is deterministic. Hence, you can encrypt both your messages and compare them with the challenge-message. Is your modified RSA scheme also deterministic? Hint: $H$ is chosen at the beginning of the CPA-game.
My lecture notes state that of the AES operating modes ECB, CBC, CTR, CCM (CTR+CBC MAC) and GCM, only CCM and GCM provide authenticity. In CCM, as I understand it, the authenticity lies in the MAC, i.e. the symmetric key. AES-GCM calculates the authentication tag (AT) using, among other things, the additional auth...
How does AES-GCM and AES-CCM provide authenticity?
My lecture notes state that of the AES operating modes ECB, CBC, CTR, CCM (CTR+CBC MAC) and GCM, only CCM and GCM provide authenticity. In CCM, as I understand it, the authenticity lies in the MAC, i.e. the symmetric key. AES-GCM calculates the authentication tag (AT) using, among other things, the additional auth...
A $m$-dimentional full-rank integer lattice $\Lambda\in\mathbb{Z}^{m}$ can be defined as the set of all *integer* linear combinations of $m$ linearly independent over $\mathbb{R}$ basis vectors $\textbf{B}=\{\vec{b}_{1},\ldots,\vec{b}_{m}\}\subset\mathbb{Z}^{m}$: $$\lambda=\mathcal{L}(\textbf{B})=\left\{\textbf{B}\vec...
I am considering using a hybrid approach by combining ECIES (Elliptic Curve Integrated Encryption Scheme) with Kyber KEX (Kyber Key Exchange) for secure communication. Instead of using the traditional Curve25519 key exchange in ECIES, I want to replace it with Kyber KEX, which is post-quantum secure. This way, I would ...
I am working on a proof for a secure aggregation protocol in which the server aggregates values from several clients. A challenge in the proof is that the server may lie about which clients have dropped out, requiring the simulator to equivocate the encrypted values it has sent to end up with the correct output on the ...
In go/src/crypto/internal/nistec/p256_asm_arm64.s Line 448 / 473 / 498 / 524, We can see the code mul Ord with **hlp1** but NOT **hlp0**. According Montgomery Multiplication, shouldn't we mul Ord with **hlp0**? ``` // First reduction step MUL acc0, hlp1, hlp0 MUL const0, hlp1, t0 ADDS t0, acc0, acc0 UMUL...
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...
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...
I am not familiar with SAASM, but I have read a little bit about the older scheme PPS-SM and can answer that. The SV (space vehicle - aka the satellite) transmits an encrypted `P(Y)` code. The encryption key, called Cryptovariable Daily Key (`CVd`) changes every day. If the receiver wants to acquire the signal, it...
I am trying to do some calculations with the Paillier Homomorphic encryption scheme. Specifically, given three plain text integers, `x1, x2,`and `x3`. I want to first encrypt them, getting their corresponding ciphertexts, say `c1, c2` and `c3`. I want to find the results of `(x1+x2+x3)/3` by utilizing `c1, c2, c3` and ...
How to calcualte the average of several plaintexts with Paillier homomorphic encryption?
I am trying to do some calculations with the Paillier Homomorphic encryption scheme. Specifically, given three plain text integers, `x1, x2,`and `x3`. I want to first encrypt them, getting their corresponding ciphertexts, say `c1, c2` and `c3`. I want to find the results of `(x1+x2+x3)/3` by utilizing `c1, c2, c3` and ...
I am trying to do some calculations with the Paillier Homomorphic encryption scheme. Specifically, given three plain text integers, `x1, x2,`and `x3`. I want to first encrypt them, getting their corresponding ciphertexts, say `c1, c2` and `c3`. I want to find the results of `(x1+x2+x3)/3` by utilizing `c1, c2, c3` and ...
I am trying to do some calculations with the Paillier Homomorphic encryption scheme. Specifically, given three plain text integers, `x1, x2,`and `x3`. I want to first encrypt them, getting their corresponding ciphertexts, say `c1, c2` and `c3`. I want to find the results of `(x1+x2+x3)/3` by utilizing `c1, c2, c3` and ...
Encrypting arbitrary large files in AEAD chunks - how to protect against chunk reordering?
If Bob takes a plaintext and encrypts it with their own public key and hands it to Eve who in turn encrypts it with her public key, we now have a cipher text that requires both Bob and Eve to decrypt it, to get the original plaintext. However once Eve has encrypted it, is there anything Bob can do to confirm that the ...