instruction
stringlengths
15
30k
I would like to investigate if it is possible to introduce Differential Privacy (DP) to a model via both adding Gaussian noise to the training data and then training with DP-SGD updates. Is it a valid way to introduce DP ? In other words, if we separately applied Gaussian noise to the data the system would be assign...
I would like to investigate if it is possible to introduce Differential Privacy (DP) to a model via both adding Laplacian noise to the training data and then training with DP-SGD updates. Is it a valid way to introduce DP ? In other words, if we separately applied Laplacian noise to the data the system would be assi...
A custom file format has a header encrypted with a 2048-bit RSA public key. I need to decrypt it using a 2048-bit RSA private key. The header has 48 bytes, and according to the scheme I got for the task, after decryption I should get a 48 bytes of "plaintext" payload. However, this scheme does not make any sense to ...
According to FIPS 186-5 § D.1.1.5 Choice of Base Points I should be able to create ECDSA signatures with custom base points on P-256 (secp256r1). Does standard PKCS#11 support this feature? This is how far I got building example code, based on `org.xipki:ipkcs11wrapper:1.0.4` and SoftHSM 2.6.1: ```kotlin impo...
In PKCS#11, can I set a custom base point for a secp256r1 ECDSA signature?
According to FIPS 186-4 § D.1.1.5 Choice of Base Points I should be able to create ECDSA signatures with custom base points on P-256 (secp256r1). Does standard PKCS#11 support this feature? This is how far I got building example code, based on `org.xipki:ipkcs11wrapper:1.0.4` and SoftHSM 2.6.1: ```kotlin impo...
According to FIPS 186-4 § D.1.1.5 Choice of Base Points I should be able to create ECDSA signatures with custom base points on P-256 (secp256r1). Does standard PKCS#11 support this feature? This is how far I got building example code, based on `org.xipki:ipkcs11wrapper:1.0.4` and SoftHSM 2.6.1: ```kotlin impo...
Consider a system where DES is used to encrypt HTTP GET requests. The first three bytes correspond to the character sequence "GET". How many encrypted messages is it necessary to intercept to be sure to guess the key used to encryption ?
I'm using the Rivest Shamir Wagner Time Lock Puzzle setup in an application, leveraging Pietrzak's algorithm for generating the proof. (https://eprint.iacr.org/2018/627). My question has to do with selecting a proper starting point. In this paper https://eprint.iacr.org/2019/619 the authors talk about verifying th...
You don't have things quite right; I suspect focusing on the DES block size is confusing you. Here is the way I found useful when addressing this situation: we model our decryption such that if we decrypt the ciphertext with the correct key, we get the correct plaintext; if we decrypt with an incorrect key, we get a...
Is it theoretically possible to use homomorphic encryption to run an encrypted algorithm over encrypted data? If this is not possible, is it at least possible to run an encrypted algorithm over plain data (beyond encrypted data over a plain algorithm)? Ideally, can you cite papers where I can read about it?
Homomorphic encryption with both algorithm and data encrypted?
I'm using the Rivest Shamir Wagner Time Lock Puzzle setup in an application, leveraging [Pietrzak's algorithm for generating the proof](https://eprint.iacr.org/2018/627). My question has to do with selecting a proper starting point. In [this paper](https://eprint.iacr.org/2019/619) the authors talk about verifying...
I am a beginner, I can understand the basics of ECC and elliptic curve, I can't find where I missed to understand. But I have a great doubt in ECDH regarding below. Could any of you please clarify for me? I will ask with the help of an example. Example: 1. Let $G=(1,3)$ be the generator point with order $n=18$ fo...
How to choose a random secret key for ECDH?
Is it theoretically possible to use homomorphic encryption to run an encrypted algorithm over encrypted data? If this is not possible, is it at least possible to run an encrypted algorithm over plain data (beyond a plain algorithm over encrypted data)? Ideally, can you cite papers where I can read about it?
Does the order of Lagrange interpolation have any role in reconstructing the secret key in Shamir's secret share?
Let's say I make a signing and verification ECDSA module. The signing module receives a plain message and outputs a signed message. The verification module takes the signed message and checks consistency. Theoretically which things should be known to both modules: 1. Padding scheme for message 2. Hashing functio...
Is it possible to find a secure curve which's *base* field is the *scalar* field of secp256k1? In general, can you find a secure curve defined over the scalar field of any secure curve other than secp256k1? (For example, a secure curve defined over the scalar field of ed25519?)
Can you find a secure curve defined over the scalar field of secp256k1?
Is it possible to find a secure curve which's *base* field is the *scalar* field of secp256k1? In general, can you find a secure curve defined over the scalar field of any secure curve? (For example, a secure curve defined over the scalar field of ed25519?)
The OpenSSL 3.0 `rand` function's DRBG uses the getrandom() system call to get 48 bytes of secure entropy from the kernel. It also uses other information like the system uptime, available ram, and other factors public in user space. So if the getrandom() function is compromised by an adversary using a rootkit, how woul...
Is it possible to find a secure curve which's *base* field is the *scalar* field of secp256k1? In general, can you find a secure curve defined over the scalar field of any secure curve? (For example, a secure curve defined over the scalar field of ed25519?) *Edit*: Using the same parameters as secp256k1 (in ...
Is it possible to find a secure curve which's *base* field is the *scalar* field of secp256k1? In general, can you find a secure curve defined over the scalar field of any secure curve? (For example, a secure curve defined over the scalar field of ed25519?) *Edit*: Using the same parameters as secp256k1 (in ...
Is it possible to find a secure curve which's *base* field is the *scalar* field of secp256k1? In general, can you find a secure curve defined over the scalar field of any secure curve? (For example, a secure curve defined over the scalar field of ed25519?) *Edit*: Using the same parameters as secp256k1 (in ...
In my application I have an SQLite database that stores labels for images, like this: ``` IMAGE ID | LABEL 1 | foo 1 | bar 2 | bar 3 | foo ``` The LABEL column is indexed as it is important that I can efficiently find all images with a certain label. At rest I would like to encr...
In my application I have an SQLite database that stores labels for images, like this: ``` IMAGE ID | LABEL 1 | foo 1 | bar 2 | bar 3 | foo ``` The LABEL column is indexed as it is important that I can efficiently find all images with a certain label. At rest I would like to encr...
In my application I have an SQLite database that stores labels for images, like this: ``` IMAGE ID | LABEL 1 | foo 1 | bar 2 | bar 3 | foo ``` The LABEL column is indexed as it is important that I can efficiently find all images with a certain label. At rest I would like to encr...
Consider a Tor hidden service. I want to retrieve the main page of such website in such a way that I can later prove to a **skeptical** third party that the website with this certificate (identified by the public key in the address) provided me with this exact HTML page. Is this possible assuming the website does no...
I want to use a data structure like merkle tree in a hypothetical blockchain that, if needed, can fast check whether a wallet/account has received directly or indirectly from a specific list of wallets/accounts in the past. And in an ideal case, how much of the current balance of this wallet has been received from the ...
That is not possible, except with some help from the website administrators, as suggested in the answer [here][1]. TOR gives us some browsing anonymization; so, it doesn't give you any non-repudiation. BTW, how could you demonstrate the chain of proxies used to download the website metadata was not emulated by you?...
Specifically if we know the $r$ takes values from the set $\{0,1\}$and $c=g^r*h^m$ does the hiding property still hold? I think I already managed to prove that the binding property holds due to the difficulty of the Dlog problem and my intuition says that the hiding property is compromised. But I can't seem to figure o...
Is a Pedersen commitment still secure when r is either 0 or 1?
I am reading this explanation of zkSnark written by Maksym Petkus - https://arxiv.org/pdf/1906.07221.pdf In page 24, the zk-SNARK of polynomial is explained. In setup phase, the proving and verification keys are created by a trusted setup. I understood how proof is created using the proving key. However, if we s...
How exactly bilinear pairing multiplication in the exponent of g is used in zk-SNARK polynomial verification step?
I am reading this explanation of zkSnark written by Maksym Petkus - https://arxiv.org/pdf/1906.07221.pdf In page 24, the zk-SNARK of polynomial is explained. In setup phase, the proving and verification keys are created by a trusted setup. I understood how proof is created using the proving key. However, if we s...
A Bilinear Pairing has many properties including $e(A^\alpha, B) = e(A, B^\alpha) = {e(A, B)}^{\alpha}$ i.e. you can move the exponent of the left hand side term to the right hand side or you can move it outside of the $e$ map itself. (In your example, $A = B$) ---- **Polynomial Restriction Check** ...
I am reading this explanation of zkSnark written by Maksym Petkus - https://arxiv.org/pdf/1906.07221.pdf In page 24, the zk-SNARK of polynomial is explained. In setup phase, the proving and verification keys are created by a trusted setup. I understood how proof is created using the proving key. However, if we s...
A Bilinear Pairing has many properties including $e(A^\alpha, B) = e(A, B^\alpha) = {e(A, B)}^{\alpha}$ i.e. you can move the exponent of the left hand side term to the right hand side or you can move it outside of the $e$ map itself. (In your example, $A = B$) ---- **Polynomial Restriction Check** Th...
A Bilinear Pairing has many properties including $e(A^\alpha, B) = e(A, B^\alpha) = {e(A, B)}^{\alpha}$ (where $\alpha$ is a scalar) i.e. you can move the exponent of the left hand side term to the right hand side or you can move it outside of the $e$ map itself. (In your example, $A = B$) ---- **Polyn...
A Bilinear Pairing has many properties including $e(A^\alpha, B) = e(A, B^\alpha) = {e(A, B)}^{\alpha}$ (where $\alpha$ is a scalar) i.e. you can move the exponent of the left hand side term to the right hand side or you can move it outside of the $e$ map itself. (In your example, $A = B$) ---- **Polyn...
I am reading this explanation of zkSnark written by Maksym Petkus - https://arxiv.org/pdf/1906.07221.pdf In page 24, the zk-SNARK of polynomial is explained. In setup phase, the proving and verification keys are created by a trusted setup. I understood how proof is created using the proving key. However, if we s...
A Bilinear Pairing has many properties including $e(A^\alpha, B) = e(A, B^\alpha) = {e(A, B)}^{\alpha}$ (where $\alpha$ is a scalar) i.e. you can move the exponent of the left hand side term to the right hand side or you can move it outside of the $e$ map itself. (In your example, $A = B$) ---- **Polyn...
Where can I find a clear algorithm diagram of speck algorithm? I want to follow steps to write an arm assembly code.
Where can I find a clear algorithm diagram of speck algorithm?
The OpenSSL 3.0 `rand` function's DRBG uses the `getrandom()` system call to get 48 bytes of secure entropy from the kernel. It also uses other information like the system uptime, available RAM, and other factors public in user space. So if the `getrandom()` function is compromised by an adversary using a rootkit, how ...
> Where can I find a clear algorithm diagram of speck algorithm? Have you looked at [the spec wiki page][1] - that (at the time I write this) includes both an algorithm diagram and a C implementation (however, the C implementation uses more #define's than I would use to explain things...) [1]: https://en.wikipedi...
In my application I have an SQLite database that stores labels for images, like this: |IMAGE ID | LABEL| |-|-| 1 | foo 1 | bar 2 | bar 3 | foo The LABEL column is indexed as it is important that I can efficiently find all images with a certain label. At rest I would like to e...
> Similar to bit warden, the AES/CBC 256 with PKCS7 padding and shared master password with Argon2 ID KDF is used to encrypt the whole DB, each password and TOTP secrets, all with randomly generated salts and IVs. I'd use authenticated encryption, or possibly AES-SIV to encrypt the passwords instead. AES-CBC is kind...
> Similar to bit warden, the AES/CBC 256 with PKCS7 padding and shared master password with Argon2 ID KDF is used to encrypt the whole DB, each password and TOTP secrets, all with randomly generated salts and IVs. I'd use authenticated encryption, or possibly AES-SIV to encrypt the passwords instead. AES-CBC is kind...
Where can I find a clear algorithm diagram of SPECK algorithm? I want to follow steps to write ARM assembly code.
Where can I find a clear diagram of the SPECK algorithm?
Suppose we sign and verify messages with a DSA scheme. Before signing the first message the necessary parameters $(p,q,h,g,x,y)$ are initialized, including the nonce $k$ as an integer between $(1,q-1)$. For each message, this value is increased by a fixed amount $b$. Therefore it grows linearly . How can I prove...
Why using linear increasing nonce in DSA in a bad idea?
I have a request in which I get a series of data in clear (nothing encrypted) and a mac. The question is whether the mac should be validated first or if the fields are filled in or are numerical (or similar validations). I have always considered that the mac must be validated first, however, I can think of no argu...
Does the order of validations and mac with clear text matter?
I have a request in which I get a series of data in clear (nothing encrypted) and a MAC / authentication tag. The question is whether the MAC should be validated first or if the fields are filled in or are numerical (or similar validations). I have always considered that the MAC must be validated first, however, I ...
Does the order of validations and MAC with clear text matter?
A Bilinear Pairing has many properties including $e(A^\alpha, B) = e(A, B^\alpha) = {e(A, B)}^{\alpha}$ (where $\alpha$ is a scalar) i.e. you can move the exponent of the left hand side term to the right hand side or you can move it outside of the $e$ map itself. (In your example, $A = B$) ---- **Polyn...
Is it possible to find a secure curve which's *base* field is the *scalar* field of secp256k1? In general, can you find a secure curve defined over the scalar field of any secure curve? (For example, a secure curve defined over the scalar field of ed25519?) *Edit*: Using the same parameters as secp256k1 (in ...
On an exam I recently took, one of the questions was: > Consider the following signature scheme. The public key is *(p,g,g^x)*, where p is a large prime number. *g* is a generator of Z*p, and *x* is a random number in Zp-1. The secret key is *x*. The scheme also uses a public hash H(M) that maps arbitrary messages t...
Why isn't the provided scheme UF-CMA secure?
I recently took an exam where one of the questions was roughly the following: > You need a specific way for sender S to send a large file M to a receiver R with their secret-public key pair, without interaction. You **cannot use [interactive key exchange protocols][1]**. The receiver’s public key is assumed to be au...
How can I send someone a large file safely without using key exchange protocols (for encryption)?
Can you re-encrypt data without knowing what the data is or using PRE?
On an exam I recently took, one of the questions was: > Consider the following signature scheme. The public key is *(p,g,g^x)*, where p is a large prime number. *g* is a generator of Z*p, and *x* is a random number in Zp-1. The secret key is *x*. The scheme also uses a public hash H(M) that maps arbitrary messages t...
On an exam I recently took, one of the questions was: > Consider the following signature scheme. The public key is $(p,g,g^x)$, where $p$ is a large prime number. $g$ is a generator of $\mathbb Z^*_p$, and $x$ is a random number in $\mathbb Z_{p-1}$. The secret key is $x$. The scheme also uses a public hash $H(M)$ t...
> an attacker would be able to compute the private key by using $\log_g(g^x)$ to find $x$. No, because we are supposed to assume/understand that the public key really is $(p,g,g^x\bmod p)$, and that $p$ is such that the Discrete Logarithm Problem is hard. A meta reason is that if it was possible to compute the priva...
Normally I use Argon2 to generate an encryption key, and then use AES to encrypt data with that key. Can I just set the hash size to be equal to the data size, set the associated data to a random value, and then just use Xor on the Argon2 output to encrypt/decrypt the data instead? Or are there some cryptographic prop...
Can I use Argon2 to encrypt data?
The referenced paper describes a $(t, n)$ threshold signature scheme. That is a signature scheme where any $t+1$ out of $n$ parties can generate a signature by working together. In such a scheme then the assumption will be that at most $t$ out of the $n$ parties are malicious. Clearly if more than $t$ parties are malic...
If you look at the pseudo-code of Argon2 you'll find that it creates the "tag" at the end of the function: return Hash(C, tagLength) The tag itself is just a hash. For Argon2, [the `Hash` call uses Blake2b](https://en.wikipedia.org/wiki/Argon2#Variable-length_hash_function) to create a hash function with *co...
I am simply wondering what the bit-length in the algorithm variant in the table below refers to? For the hash functions I assume that this refers to the ouput length in bits. For instance for SHA3-256 this means the hash will be of 256 bits in length. Is this correct? But, then, what does the 256 mean for the XOF SH...
What does the 256 in SHA3-256 and SHAKE256 refer to?
> SHA3-256 this means the hash will be of 256 bits in length. Is this correct? Yes, that is correct - exactly the same as SHA2-256 means that hash has an output of 256 bits. > But, then, what does the 256 mean for the XOF SHAKE256? Obviously, that's not the output length (that's up to the application). Instea...
If you look at the pseudo-code of Argon2 you'll find that it creates the "tag" at the end of the function: return Hash(C, tagLength) The tag itself is just a hash. For Argon2, [the `Hash` call uses Blake2b](https://en.wikipedia.org/wiki/Argon2#Variable-length_hash_function) to create a hash function with *co...
> SHA3-256 this means the hash will be of 256 bits in length. Is this correct? Yes, that is correct - exactly the same as SHA2-256 means that hash has an output of 256 bits. > But, then, what does the 256 mean for the XOF SHAKE256? Obviously, that's not the output length (that's up to the application). Instea...
If you look at the pseudo-code of Argon2 you'll find that it creates the "tag" at the end of the function: return Hash(C, tagLength) The tag itself is just a hash. For Argon2, [the `Hash` call uses Blake2b](https://en.wikipedia.org/wiki/Argon2#Variable-length_hash_function) to create a hash function with *co...
I have built a small password manager desktop app using python. This app falls under the master-password model.The app connects to two databases stored locally. The first database stores the users username for my app and the hashed (sha256+salt) master password it also stores an email for password recovery puprpose. Th...
**Use Case:** Web application accessed in browser. Registered users can store personal notes in the application, these notes are stored in a SQL database on a online server. The user can store unencrypted notes and encrypted notes. For unencrypted notes the process is trivial, just store the notes in the database. F...
Is it safe to store AES-KW encrypted key in database?
This is a repost because a moderator decided to delete my original comment. Don't want to upset them it was 100 percent relevant but anyway... I was wondering whther q-comps really break it. Schor's algorithm works via the wuantum fourier transform, which reveales the cycle time and thus phi. However, with mod q, a pr...
Are Schnorr's algorithm really subject to q-computer attacks?
This is a repost because a moderator decided to delete my original comment. Don't want to upset them it was 100 percent relevant but anyway... I was wondering whther q-comps really break it. Schor's algorithm works via the quantum fourier transform, which reveales the cycle time and thus phi. However, with mod q, a pr...
This is a repost because a moderator decided to delete my original comment. Don't want to upset them it was 100 percent relevant but anyway... I was wondering whther q-comps really break it. Schor's algorithm works via the quantum fourier transform, which reveales the cycle time and thus phi. However, with mod q, a pr...
I was wondering whether quantum-computers really break Schnorr's signature scheme. Schor's algorithm works via the quantum Fourier transform, which reveals the cycle time and thus phi. However, with a multiplicative group mod $q$, a prime, everyone knows the cycle time, but that isn't the problem (unlike RSA). The prob...
I was wondering whether quantum-computers really break Schnorr's signature scheme. Schor's algorithm works via the quantum Fourier transform, which reveals the cycle time and thus phi. However, with a multiplicative group mod $q$, a prime, everyone knows the cycle time, but that isn't the problem (unlike RSA). The prob...
I store the ciphertext and the nonce in a SQL database. If I decrypt the ciphertext change it and encrypt it again I generate a new nonce, so that I do not encrypt two different plaintexts with the same nonce. After encrypting the updated plaintext I store the ciphertext and the new nonce back to the database. My...
> an attacker would be able to compute the private key by using $\log_g(g^x)$ to find $x$. No, because we are supposed to assume/understand that the public key really is $(p,g,g^x\bmod p)$, and that $p$ is such that the Discrete Logarithm Problem is hard. A meta reason is that if it was possible to compute the priva...
It is a bit stupid question, but I am so confused. Please examine my explanation. What is the space that exponents the generator $g$ of a cyclic group $G$ of prime order $p$? I think it is $\mathbb{Z}_p$ since $|G|=p$, so that $G=\{g^0, g^1, \ldots, g^{p-1}\}$. Thus the space that the exponents live is $\mathbb{Z}_p...
What is the space that exponents of ElGamal encryption scheme live?
From the [PLONK paper](https://eprint.iacr.org/2019/953.pdf). On pages 19 & 20, the paper describes the prescribed permutation check in PLONK. [![enter image description here][1]][1] In the last step of the proof, these are the checks a) $L_1(a)(Z(a) - 1) = 0$ b) $Z(a)f'(a) = g'(a)Z(a \cdot g)$ In (a)...
From the [PLONK paper](https://eprint.iacr.org/2019/953.pdf). On pages 19 & 20, the paper describes the prescribed permutation check in PLONK. [![enter image description here][1]][1] In the last step of the proof, these are the checks a) $L_1(a)(Z(a) - 1) = 0$ b) $Z(a)f'(a) = g'(a)Z(a \cdot g)$ In (a)...
Do you know a blockchain that does not use at all cryptographic primitives standardized by USA or other countries ? It is strange for me that the security of many cryptocurrencies are based on ciphers, hash functions, elliptic curves, etc. from american standards. It is normal when a cryptographic product contains stan...
The CEO of the organization XYZ decides to hold a vote to decide whether employees should be allowed to work from home (WFH) either one, two or three days a week. All 4 employees of XYZ (excluding the CEO), need to vote either “WFH one” , “WFH two” or “WFH three”. To ensure privacy, the CEO asks employees to send th...
Do you know a blockchain that does not use at all cryptographic primitives standardized by USA or other countries? It is strange to me that the security of many cryptocurrencies is based on ciphers, hash functions, elliptic curves, etc. from American standards. It is normal when a cryptographic product contains sta...
I'm interested in methods of wrapping an AES DEK (Data Encryption Key) using AES KEK (Key Encryption Key). Is there an advantage to using [AES key wrap as defined in RFC 3394](https://www.rfc-editor.org/rfc/rfc3394) as opposed to simply adding a random nonce to the DEK before encrypting it? Context: My KEK is based...
What is the advantage of AES key wrap as opposed to adding a random nonce?
Given some group in which discrete logarithms are hard. Furthermore, two random, unrelated group generators $G_a, G_b$, and a third generator defined by $G_c = G_a + G_b$. Can you compute $xG_a$ if you know only $xG_c$, $G_a$ and $G_b$?
Given three generators $G_a, G_b, G_c$ with $G_c = G_a + G_b$. Is it hard to compute $xG_a$ from $xG_c$?