instruction
stringlengths
32
27.2k
Two diferents inputs can have the same output in $Shake256$ for every output size (for example, $Shake256(input_1, \ell) = Shake256(input_2,\ell)$ for every $\ell$)?
I'm implementing AES GCM 256 bit at the moment. Now I'm finished with copying the content of the standard as a program and now have to make it actually work. With the test cases in the official NIST specification (https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf) and the original one (htt...
since we can put 448 bit of the actual message in every block(56 characters), if I have a string of 56 charcters ba7816bf8f01cfea414140de5dae2223bda12ae1a5324sfdserew3ra does it mean that I only have one message block with the binary of below? I have also added the 1 and the length: 011000100110000100110111001110000011...
According to the whitepaper, Blake3 can be used as a key derivation function (function key_derive). Currently, as a key derivation function, I used Rust's Hkdf::<Sha256> which takes as input the master key and salt. Adding salt allows to ensure that even in the case I reuse the master key, the output of the Hkdf is ran...
we have a service who has a list of public keys got from clients (for example 1000 public keys. not too many) service gets an encrypted message from one of clients. this message is encryped with a public key and defenitly service has that key. can service find out which public key is used to encrype that data? for more...
In Pollard Rho's Algorithm, a function $f$ with pseudorandom properties is required. Through this property, the birthday paradox can be leveraged to find a collision. But not all functions are pseudorandom. I am trying to understand what makes a function a good pseudorandom function. Consider the following sample funct...
Suppose Alice wants to send messages to Bob. However she doesn't trust Bob. She believes that Bob may publicly disclose a fake message, claiming that it came from Alice. This message will cause the public to have a negative opinion of Alice. Alice can use signing to prove that a message came from her. However, she cann...
There are many "post-quantum" schemes have been proposed. The security of most of them is only proven under random oracle model or uses forking lemma. As described by Boneh et al. (Random Oracles in a Quantum World), post-quantum schemes should further consider the "quantum-accessible" random oracle (QROM). However, ma...
Consider message $P$ being split into $n$ blocks that match the block size of the underlying block cipher. The message has fixed length and the length is always a multiple of the block size. Encryption using CTR mode: \begin{align} C_0 &= P_0 \oplus E_k(nonce\mathbin\|0) \\ C_1 &= P_1 \oplus E_k(nonce\mathbin\|1) \\ \v...
In Jonathan Katz and Yehuda Lindell's Introduction to Modern Cryptography (3rd edition), the key generator of e.g. signature has The key-generation algorithm $\mathsf{Gen}$ takes as input a security parameter $1^n$ and outputs a pair of keys $(\mathrm{pk},\mathrm{sk})$. These are called the public key and the private ...
Is using /dev/hwrng for raw key material secure (as long as you trust the hardware)? I tested it using the rngtest tool and it has good output.
I am using a 8 bit Sbox having 16 entries with a lookup table of 4x4 in cryptographic algorithm. Sbox is constructed on subgroup of galois field 2^8. I want to calculate number of quadratic equations used to describe this Sbox over GF(2) so I can calculate resistance of algorithm against algebraic attacks.Since AES Sbo...
I was wondering if someone could provide some assistance with understanding a permutation cipher. I have both the cipher text as well as the plaintext but am having some difficulties trying to find the period (or key). What are the steps to locate the key? This is the cipher text:
I’m working on an aes encryption and decryption project in 8086 assembly! I managed to code an encryption algorithm and it worked perfectly. No I’m working on the decryption algorithm. I’ve managed to code all the inverse transformations. But how about the inverse key expansion?? How is the aes key expansion preformed ...
I want to implement Elliptic Curves arithmetics (for edu purpose and better understanding) for special NIST primes: point addition, exponentiation, etc.. all operations needed for EC encryption/decryption, digital signatures, and key exchanges. I'm interested in only special NIST primes, not in implementation for a gen...
I read about Identity Based Signatures this week. I was thinking about its application in major fields like IoT etc. Are there any such applications? For example: Multi-signature have application in cryptowallets. I am trying to see are there any major application of IBS like this. Thanks.
A previous discussion on Cryptography StackExchange leads me to understand that 7-Zip does not use salt to derive an encryption key from password to use its AES-256 encryption; that this is a potentially severe shortcoming; and that its impact is to make it relatively easy to crack multiple .7z files. My question is, w...
The Wikipedia Pohlig Hellman algorithm says that the complexity of Pohlig-Hellman algorithm is $$\displaystyle {\mathcal {O}}\left(\sum _{i}{e_{i}(\log n+{\sqrt {p_{i}}})}\right)$$ I understand that the complexity of calulating $(x \mod p_i^{e_i})$ is ${\mathcal {O}}\left({e_{i}{\sqrt {p_{i}}}}\right)$. But which part ...
I'm pretty new at Cryptography (and at Cryptanalysis), but I went to the website Elliptic to try to discover the elliptic curve they use, and I found they use ECDP 256. So, by SEC2 I discovered they do use either secp256r1 or secp256k1. How can I know which one they do use? I do also need to find the base point they ar...
When using AES in CBC mode, padding is required when the last plaintext block has not the length required by the cipher. Let's say $k$ mode bytes would be required to fill the block. My idea was to pad the last block with $k-1$ random bytes followed by one byte that corresponds to the integer value of $k$ (or $k-1$). T...
DFC cipher uses affine transformations mod $2^{64}+13$. Soon after DFC's publication, Ian Harvey raised the concern that reduction modulo a 65-bit number was beyond the native capabilities of most platforms, and that careful implementation would be required to protect against side-channel attacks, especially timing att...
How do I start studying Zero-Knowledge proofs? What are some good books and entry-level research papers on that topic? What are some prerequisites of the same?
I need to verify that the point in this public key 04 11 95 23 03 f0 f1 f1 45 67 14 98 e4 39 80 ce 25 39 02 6e 72 34 fe 02 38 8a ea cc fb 3a 3d 4d dc d9 6d 3c fe 8b 55 bf ea c3 3a a1 59 13 54 b3 91 79 45 b7 3b 49 d9 0e 96 2a de 79 d3 49 dc 79 ca is in secp256r1. I already know the parameters $a$ and $b$ of the curve, b...
The notation I'm using here is from my textbook. I'm doing a CTF challenge where I need to know the value of $LE_0$. For now, I only have $RE_0$ and $RE_{16}$. I would like to know if it's possible to calculate $LE_0$ from just $RE_0$ and $RE_{16}$. The round function F is splitmix64, which is used in generating pesudo...
I need to encrypt some text in the browser to be stored server side. After a little research I decided to use the SubtleCrypto API. I created the the crypto key using the following code: window.crypto.subtle .generateKey( { name: "RSA-OAEP", modulusLength: 4096, ...
I have been studying a cryptosystem using Mersenne primes. More specifically, this paper. I have implemented this cryptosystem in Python, but I am missing the key encapsulation system. On page 12, they refer to something known as an "expandable hash function". It should take as input a $\lambda$-bit string and output a...
I dont know where to put this question, and the most appropriate would be here i guess, i found no criptocurrency stack, if its not here i would apreciate a link to post this I've downloaded a monero node on my laptop which roughtly took 105GB and a full night even though it said it was only 5 hours of work And since i...
Highly nonlinear functions are used in combination generators and other stream ciphers. We know that maximum nonlinearity (hamming distance to all affine functions) of $f$ is achieved when $f$ is bent function. This will be $$NL=2^{n-1}-2^{(n/2)-1}$$ when $n$ is even. Also when $n$ is odd, this bound is not satisfied. ...
There is a statement in the article of "Public-Key Cryptosystems from Lattice Reduction Problems" that presents GGH encryption scheme: "The cryptanalytic problem underlying our scheme is to approximate the closest vector problem (CVP) in a lattice, given a "non-reduced" basis for that lattice" On the other hand, in his...
For RLWE (Ring Learning With Errors) scheme, we use $R_{q} = \mathbb{Z}_{q}[x]/(x^{n} +1) = \mathbb{Z}_{q}[x]/(\Phi_{2n}(x))$ where $n = 2^{d}$ for some $d$. Since there exists $2n$-th root of unity in $\mathbb{Z}_{q}$ (which is the generator of the cyclic group $\mathbb{Z}_{q}^{\times}$), we can do FFT with the choice...
I'm trying to do Wieners' attack for the case \ n = 41812289888807017163984918063150535143241733968369526096686035411100281058895684734892837916893307091448099221185297849468517662339430579635277837641016589091836673752854703947923396020640786536145707 c = 56475415333809633465852243642244346774037239512639869488101987...
I'm studying the specification of Kyber that was submitted to NIST PQC Round 3. However, I cannot figure out how they compute the error probability $\delta$ for Kyber 512, 768 and 1024. I have read the Kyber paper (written with respect to round 1), especially its Theorem 1 (correctness theorem). But the paper did not e...
I have some code that accepts a password in string format, and hash it with SHA3-512 before passing it to bcrypt for hashing. However, by some coincidence, I found a test case that produces a hash that contains '\x00' in the middle of the hash result, as seen below: password_str = 'tes15!tes15!tes15!tes15!tes15!tes15!t...
I have a system where a block cipher key (likely AES) is entered via a 'command line' over a serial console, probably as hex. The system has no 'print key' feature, so the key is hopefully 'ingest only'. I was considering offering a 'output of known test vector V with new key K and known/fixed IV is X', where X is prin...
To begin with I need to say I have no experience in cryptography (I'm a software developer) and found this place trying to figure out how to solve this, Here is the problem I need to solve in my job: Input: an integer varying from 1 up to 8 digits (i.e. 12345678, 2352, 76543) Output: a fixed size 6 digits code that co...
Let's suppose I encrypt a message with a block cipher in CBC mode, keep the key and IV secret and XOR a random block of data in each encrypted CBC block, being the XORed block the same for each CBC block (constant). Does it add some encryption strength? (I know this question is weird, but I need to know).
In Kyber round 3 specification, the table 4 gave the security estimates of Primal and Dual attack with respect to Kyber 512, 768 and 1024 (see the figure below). However, using the python script given in the paper (see the github, run Kyber.py), it seems that I cannot reproduce the same result (however the numbers are ...
zk-SNARK was a powerful tool for privacy-respecting e-cash. However, recent years, in the literatures about anonymous authentication scheme, such as group signatures, anonymous credential, blind signature, etc., the construction of these schemes did not use zk-SNARK as the NIZK tool, but traditional ways(Fiat-Shamir tr...
I just came across this term “forward search attack” while reading about Interchange key and Session key. The book mentioned that using session key helps to prevent attacks such as forward search attack.
I`ve read multiple times that it is not safe to use the shared key resulted from DH key exchange directly and that you need to do a KDF or hash over it and then use the result as a key. Why is it not safe to use the shared key directly?
I have put in place a solution for a cryptographic tokenization engine for credit-card numbers. You can find it under the following repository. In the implementation I tried to respect some requirements that actually weakens the final solution, specially: 6x4 digit credit-card digit preserving token need to maintain t...
If $X_i$'s are $3$ independent random variables defined over $\{0,1\}$ with biases $\epsilon_i$'s for $1\le i \le 3 \;$ and $\epsilon_1 = \epsilon_3 = 0.$ Then $X_1 \oplus X_2$ and $X_2 \oplus X_3$ are independent. What I have done is, since $\epsilon_1 = \epsilon_3 =,$ hence $\Pr[X_1 = 0] = \frac{1}{2} = \Pr[X_3 =0...
I've been looking through https://courses.maths.ox.ac.uk/node/view_material/12662 and it mentions that: Some bases make SVP easier: A “good” basis has shorter vector norms A “good” basis has nearly orthogonal vectors I assume the reason for shorter vector norms being helpful is that there if we use an algorithm such ...
I can find a bunch of information on stuff like bcrypt and script, but I am interested in estimating the cost per hash on something like Argon2id that is GPU hardened. I am trying to do the best with what I have here. The requirement is that the user is given an 8 letter password that I can generate. My strategy is to...
Given N and e in RSA and the ability to get signature s for any message m ($s=m^d \mod{n}$), can you find the value of the private key d?
Problem: I want to build a key-value storage in such a way that it would be impossible to detect a presence of a key in the storage by inspecting it. In other words, any read operation with any valid key always returns a valid-looking value, and without additional knowledge about value it is impossible to say if this k...
When the communication between server and client starts -after a request, the computers agree on an encryption protocol to protect the data, the TLS handshake. The data may not be encrypted on the server, but it should be before sending using the server's private key. If protocols involves asymmetric encryption (and ex...
In the amazing paper "Witness Indistinguishable and Witness Hiding Protocols " by Shamir and Feige. Theorem 3.3: Let (P, V) be any ZK protocol, then the protocol is WI. The sketch of the proof involves a distinguisher $D$, which I never saw used in the context of ZK, and I don't know it's definition. Can you define $...
Why is that different wallet generating sites give different public and private keys when you enter the same passphrase even though they both use the same Algorithm (Sha 256)? Thank you P.S. Ok...one site is bitaddress.org and the other site is walletgenerator.net. i tried getting a brainwallet and used the exact passp...
I'm learning DES, but I have a question. When the plain text input, it gets a permutation by a table. But, I don't know why 01 -> 58 / 02 -> 50. Is there any special rule or principle of it? or was it just set by the creator of DES?
I was reading an article about how SHA-256 encrypts stuff (Here it is by the way) but how do we know the steps mentioned are true? I'm not a cryptography expert but I've tried making my own encryption algorithm with python by switching up the order of the letters and doing other text manipulation steps (which I've foun...
I am in the process of created a signing certificate and i have an option of RSA-4096 or RSA-3072. Is there much difference in security between the two? I know people say RSA-3072 should be good until 2030. But people may also prefer the high security. But if it makes a big difference on speed, they may not. So do you ...
I'm trying to understand how Chia Proof of Space works by reading docs here. According to one document, I need to calculate $f(x1) = f2(x1, x2)$ but with the requirement that $f1(x1) == f1(x2) + 1$. The problem is, $f1$ is not a permutation. How do I handle the $x1$'s for which there is no such $x2$? It seems $f(x1)$ i...
The papers CRYSTALS-Kyber and CRYSTALS-Dilithium both have been written by quite different authors. It seems that at least the key generation is very different from each other. CRYSTALS mainly seems to be a suite of algorithms based on the hardness of module lattices. From CRYSTALS-Kyber: CRYptographic SuiTe for Algeb...
I've been trying to create a distributed authorization protocol where identities are not revealed. Let me explain with an example. Let's assume we have 4 actors, Alice, Bob, Charlie, and Dan. Alice is authenticating at Bob and Charlie's server and getting authorization from them. This authorization is valid for one-tim...
I want to authenticate part of a message, not all of it, while creating the MAC over the entire message. Let's say I create a 16B MAC over one hundred message blocks that are 64B each. Then I send one 64B message and the combined MAC to the receiver. The receiver has to verify the 64B using the MAC while it does not ha...
PGP Digital Timestamping Service webpage mentions The service operates in a number of different "modes" depending upon the required results. The current modes are:- post: forwarding an outbound message with a proof of posting certificate clear: the received message is clearsigned and returned to the sender header: the...
Once, while idly wondering, I came up with a simple scheme to prove the authenticity of a chain of messages given the authenticity of the first. It consists of putting a hash at the end of each message (but the last, if you know where the chain is going to end) and the input to the previous hash at the beginning (or an...
I was looking into Google's DP library and its implementation of bounded DP-average. The library implemented DP-average following the following algorithm presented in Li et al. (2016): Proposition 2.22 Algorithm 2.3 satisfies ϵ-DP. [The] proof is quite long and tedious. We include [it] because to our knowledge this al...
Thinking about validation methods for guaranteeing a proper key is used. Will keeping a dummy plaintext value and its corresponding ciphertext in plaintext code expose any risk?
In the NIST suite of RNG tests (https://csrc.nist.gov/publications/detail/sp/800-22/rev-1a/final), one of the tests is the Runs Test, which tests counts of runs of 1's and 0's. According to the documentation, you need to first carry out a Frequency Test, which essentially confirms if the number of 1's within the seque...
Is there any graph that serves as a comparative analysis for the factorization problem vs discrete logarithn problem? I am implementing an hybrid encryption algorithm (RSA + Diffie-Hellman) and it is necessary for me to show qualitatively that the hybrid (RSA+DH) is more secure than RSA.
How to find $d$ with large $e$ ? If $(3\cdot d)^4 \le n$ : Wiener attacks, so what if $(3\cdot d)^4 > n$ ?
I was going through a side channel protection. It seems in the 3-shares (Appendix A) or 4-shares (Appendix B) has some computations that grows with the number of AND operations. My question: Is there any standard metric by which I can measure the cost for side channel protection (under a given requirement, such as 3-sh...
Going through LowMC, one of the main advantage of it seems to be useful in Fully Homomorphic Encryption (FHE), Multi-party Computation (MPC) and Zero Knowledge (ZK) proofs. I have no idea about any of these, but it seems lowering the number of AND gates is a big deal. Similar claim is made for the Kreyvium cipher as we...
In the question there are two functions encrypt basically does IV ⨁ DES3(P⨁IV) and encrypt_flag just encrypts the flag after being padded into a multiple of 8. IV is a random 8 byte number which is always constant. I have been looking at this question for a long time and I can't work it out. The question is to find th...
In the process of trying to answer this question, I ended up getting stuck. I found a paper which seems to solve their issue: its authors define a process which yields a pseudorandom permutation generator $h$ when applied to a pseudorandom function $f$ and the resulting $g$ composed twice onto itself: Let $f=\{f\}^n$ ...
Bob likes Apples and Oranges (virtual, not physical). Alice and Eve are fruit sellers (again, virtual, not physical). Bob wants to indicate his appetite to buy one Apple and one Orange without revealing who he is. Alice and Eve want to sell to Bob but they can't know Bob's identity. How does Bob communicate his prefere...
As in the title, but to make more clear: If, with probability 0.1, an algorithm A can distinguish between two ensembles D_n, E_n (indexed by sec. paramater n), then are D_n, E_n not computationally indistinguishable? More generally, is it true that, $$\Pr_A\Big[\big|\Pr_{x\sim D_n}[A(x) = 1] - \Pr_{x\sim E_n}[A(x) = 1]...
In any other context where I encountered the concept of soundness it was very simple: if the input does not belong to the language then the protocol fails or fails with great probability. But in the paper Witness Indistinguishable and Witness Hiding Protocols there is an interaction between a prover $P$ (with a set of ...
I'm currently reading an article which deals with "Squeezing Polynomial Masking into Tower Fields " for performing an efficient multiplication of elements in $GF(2^8)$. Thereby it is explained that one first hast to do an affine transformation on the elements in $GF(2^8)$ and apply the actual multiplication in the towe...
For the Lamport or Winternitz public keys, couldn't one just hash down the large public key to 256 bits in order to greatly reduce the public key size while still having basically the same security? Why isn't this done? Thanks for your help. If you have any further readings, they are always welcome.
Let the curve $$y^2 = x^3 + 3x+ 5$$ be defined on $Z_{19}$ . If my private key is $d=4$ what is my public key for $P=(9,1)$ . If $H(M)=4$, find your ECDSA signature for message. Randomize the parameter $k$ (For example $k=2$). Verify the signature. My steps : $Q = d \cdot P \pmod n$ $Q = 4 \cdot (9,1) \pmod {17}$...
This is a super basic cryptography and I don't get it. My professor only explained it to us on a very abstract level, which I just agreed to without questioning it. The DLP says it is easy to calculate a^x, but it is not easy to find x with a logarithm if you use a cyclic group. The idea behind the cyclic group is to s...
I'm looking at the description of NTRUEncrypt given on page 21 of http://archive.dimacs.rutgers.edu/Workshops/Post-Quantum/Slides/Silverman.pdf and using its notation. So in NTRU there are always two private parameters $F$ and $G$. However, decryption only requires knowledge of $F$. I'm confused about what the purpose ...
The security proof basically comes down to the following based on this paper. We want to show that two distributions are statistically indistinguishable. Say we have that $a,a′,x,x′$ are drawn from an ($n$-dimensional) discrete Gaussian distribution $D_{\mathbb{Z}^n,r}$ with standard deviation $r$ and that $b$ is drawn...
I am searching for an authenticated encryption sheme with random access and a good performance. The exact requirements are: Data to protect: data = data_block_0 || ... || data_block_n Every data_block has a size of n bytes, 512 for example and the complete data can have a size of many gigabytes. I search for an authent...
I was reading that subsampling amplifies the privacy budget. I understand that it reduces the contribution of data to the aggregation function. I am wondering how sub-sampling impacts the median function. Does it amplify the privacy budget while the median is calculated using smooth sensitivity?
I read a paper about a nonlinear invariant attack that is "Nonlinear Invariant Attack: Practical Attack on Full SCREAM, iSCREAM, and Midori64" And I've found a website of sagemath : https://trac.sagemath.org/ticket/21252 where they have a code to find nonlinear invariant for any S-box. But it's not official so it's not...
Currently I am working on a implementation of PBKDF2 for an embedded microcontroller. My question is that my psuedo-random function is fixed (SHA-512 HMAC) how do perform 'rounds' of encryption? I am using a vendor provided SHA-512 HMAC implementation has been verified to output correct results for single iteration vec...
I found this on page 538 (resp. 576) of Introduction to Modern Cryptography 2nd (resp 3rd) edition by Katz and Lindell. The third bullet point under Example A.6 says: $$\begin{array}{l}\text{Let }f(n)=n^4+3n+500.\text{ Then:}\\ \quad\text{(…)}\\ •\;\; f(n) = Ω(n^3 \log n).\text{ In fact, }f(n) = ω(n^3 \log n).\end{arra...
this is probably a fairly simple request, but I have'nt been able to find it anywhere. A lot of cryptography schemes have security games associated with them. In the Book by Katz, a bunch of schemes have a security game involved with them. This usually involves an Adversary trying to break the scheme, and a Challenger ...
The main definition of computational indistinguishability is that, for any ppt $A$, and distribution ensembles $\{C_n\}, \{D_n\}$, $$\bigg| \Pr_{x\sim C_n}[A(x) = 1] - \Pr_{x\sim D_n}[A(x) = 1] \bigg| \le negl(n)$$ Sometimes, one sees the following def. A gets a random "challenge" $x$ from $C_n$ w.p. 1/2 or $D_n$ w.p. ...
There is a sentence in Micciancio's Lattice lectures that says when we bound the minimum distance of a lattice using the convex body theorem for norms other than the Euclidean norm we need to assume that they are full rank lattices. The reason stated for the full dimensionality condition not been necessary is that in E...
I was wondering, why the TLS 1.3 handshake employs two different 'messages' that compute an authentication code over the whole handshake. As far as I understand, the CertificateVerify "message" computes an asymmetric digital signature based on the certificate's signature algorithm, over the whole handshake. The finishe...
Consider NIST 192 elliptic curve group https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-186-draft.pdf. What is the time complexity of discrete log problem of it? Is it Pollard $\rho$ i.e $\sqrt{N}$, where $N$ is the size of the group?
In their paper about the AEAD scheme NORX, the authors mention that $a+b$ can be "well approximated" (this is a bit a hand-wavy statement) by $$a+b \; "="\; a\oplus b \oplus ((a\land b) \ll 1).$$ (Note that the purpose of $((a \land b) \ll 1)$ is to simulate the "carry bit operation.") Is there such a neat approximatio...
What exactly is asymmetric about 'asymmetric cryptography'? https://www.sysadmins.lv/blog-en/digital-signatures.aspx says: "In other words, anything that is encrypted by a public key can be decrypted by corresponding private (or secret) key only and vice versa." This doesn't sound asymmetric. Does the asymmetry start o...
Imagine one's computer clearsigned a message by encrypting the message with one's private key and storing the two (the plaintext and the ciphertext) together in a folder (and publishing the public key). Would the encrypted message that is serving as the digital signature (whether or not that would be correct term for i...
I suppose one reason for prepending the name would be that a malicious Bob could pose as Alice by encrypting the exact same message + Alice's signature using Charlie's public key, and trick Charlie into believing that Alice sent him the message. is a comment on an answer to the question Should we sign-then-encrypt, o...
I am trying to understand the paper The Boomerang Attack from David Wagner. On page 162 about complexity of boomerang attack the paper says that: The attack requires $8 \cdot 2 \cdot 32 \cdot 2^{32} = 2^{41}$ offline computations of the $F$ function. I think I understand the attack but I cannot understand the value ...
Test vectors for SIT -encryption algorithm? I'm looking for Tests Vectors to test my implementation of SIT. Thanks a lot.
I am using Fernet encryption from python cryptography.fernet and generated the key as below salt = os.urandom(16) kdf = PBKDF2HMAC( algorithm=hashes.SHA256(), length=32, salt=salt, iterations=78643, backend=default_backend() ) key = base64.urlsafe_b64encode(kdf.de...
I use this gnark-crypto baby jubjub to implement BulletProofs, but it seems can not work well. But I use secp256k1 that will work well. So I'm wondering that if I can use baby jubjub curve to implement BulletProofs or should I do some modifications on the curve?
Assume we have the polynomial space $R_q$ defined as $R_q = Z_q/(X^n + 1)$. We draw samples $s_i \gets R_q$ uniformly at random. Additionally, we define the error distribution $\chi$ as a discrete centred Gaussian bounded by $B$. We compute the following quantities: $h_i = s_ip_1 + e_i$ where $p_1 \in R_q$ is a fixed p...
It seems to be common-practice for a signature protocol to include the algorithmID and params (if any) in the data being signed. For example: RSA PKCS#1 v1.5 includes the digest alg in the data being signed. See RFC 2318 section 10.1.2. JWT / JWS includes "protected headers" in the data being signed (which under most ...
What is the current, year 2021, padding Recommendation for RSA? PCKS1? 7? 11? OAEP?
My basic question is: How does RSA compare to using Diffie-Hellman + <some symmetric key crypto, e.g. a polyalphabetic cipher> Let's assume that factoring large numbers and computing discrete logs both approximately equally difficult, so diffie hellman is about as secure as RSA. What are the pros and cons of using RSA ...
I have passwords hashed using bcypt version \$2a\$ (e.g. "\$2a\$06\$...") and I want to convert them to version \$2b\$ (e.g. "\$2b\$06$..."). Is it possible to do that? If yes, are there any disadvantages?
Assume we have a secret $s \in Z_p$. We generate the set of secret shares $\{ (x_i, s_i) \}_{i=1}^{N}$ according to a $(N,k)$ Shamir's scheme. The evaluations are generated according to the following random polynomial: $$f(x) = s + \sum_{l=1}^{k-1} t_i x^l$$ Where $t_i \gets Z_p$ are uniformly random in $Z_p$. I am int...