instruction
stringlengths
32
27.2k
Many works, such as [YCX21] cite that $2^{-40}$ is a reasonable statistical distance for zero-knowledge proof based signatures, even when the security level is $\lambda = 128$.. I was wondering if there is any concrete analysis which motivates this decision. An even more peculiar situation is for soundness parameters. ...
Given an encryption scheme $\Pi = (G,E,D)$, either public or private, is there a name or a property to emphasize that for $c\gets \Pi.E(k,m)$, where $k$ is a key and $m$ is a message, we want $m^\prime \neq \bot$ where $m^\prime \gets \Pi.D(k^\prime, c)$ with $k\neq k^\prime$? ($\bot$ here means empty) Schemes such as ...
Table 2 of NIST SP-800 56B provides Estimated Maximum Security Strength of different modulus sizes. It means that RSA-3072 provides security of 128-bits at Max. Is it the case for symmetric algorithms also? Like AES-128 provides security strength of 128 bits at maximum? or is it like AES-128 provides security strength ...
FIPS 186-4 and NIST SP800 56B states following limits for public exponent $e$ $e$: a pre-determined public exponent − an odd integer, such that $65,537 ≤ e < 2^{256}$. What security issue arises if a larger/ smaller fixed $e$ is chosen? What happens if $e_{BitLen} > (RSA_{modulusBitLen}/2)$. Does the such $e$ introdu...
I'm new in Cryptography, if i will use SHA512, but only with 256 bits, is it equal or similar to SHA256? I'm trying to understand if there is a way to use SHA512 as SHA256
I am new in Elliptic curve, so I started with implementing (single scalar multiplication) I have done it the simple way, and then I moved to Double & Add algorithm later with NAF form. When I moved to the NAF form. Two versions of algorithm gave me two different results. And I'm not sure what did I miss. I'm using ECC ...
So I've been visiting a security lecture at my university and they introduced the concept of Chaum's mixes to us and how replay attacks can compromise the anonymity granted by a mixnet. It is explained that by adding a random string to the encryption of message X an attacker cannot simply guess a message Y in order to ...
In secp256k1, the prime order field $\mathbb F_p$ uses $$p=2^{256}-2^{32}-977$$ This is the largest prime $p$ less than $2^{256}-2^{32}$ allowing to construct a Koblitz curve $y^2\equiv x^3+b\bmod p$ of prime order, and $b=7$ is the smallest positive $b$ for this. The term $2^{256}$ is clearly to define the bit size of...
Let's say that Alice and Bob have generated truly random private keys $a$ and $b$ and want to use them in Schnorr signing. They calculate $X = g^a \cdot g^b$ as their mutual public key. For whatever reason, they want to derive several new key pairs from their existing keys. They pick a hash function $H$ and some prefix...
I'm currently implementing a Merkle Tree in Rust. One of the problems I'm facing is the complexity of generating the proof. Meaning the vector I give to the verifier in order to check if an element is present. Many people say that I should transverse the tree to find the path for the element (if the element is part of ...
The one time pad is unbreakable because each message could be one of many, and each one is equally likely. Is it possible to do this with a key exchange? (So if someone records the key exchange, there would be a large number of equally possible keys) I am already aware of Quantum Key Distribution, so please don't put t...
I'm trying to crack a crypt with a known key length. I deduced that the operation made was a hex XOR. Here is the crypt: 330a1448010816101c1e470b0248104711050903040a0844511317130d030817024812150d014817150d1c48050f0751181415071f0618060e510618000a051b190606144822080e1006040a42051d1302101e1b040a423d4651330a144806081015480...
Last year I learned about another NIST competition. https://csrc.nist.gov/projects/lightweight-cryptography/finalists And I thought to myself: "why would I continue to use heavyweight cryptography in my desktop and server environments, if we have these new schemes?" Or are they flawed in some way? I like to liken the e...
From Vitalik Buterin's Blogpost - Quadratic Arithmetic Programs: from Zero to Hero. In the blog, a cubic equation:x**3 + x + 5 == 35 is chosen. It has been assumed that this equation is some computational problem. Since, zk-SNARKs cannot be applied to any computational problem directly, we convert to algebraic circuit,...
I've a question about XChaCha20-Poly1305, from a brute force perspective. Suppose we have the power to brute force crack it. If the IV is known to the attacker and it's only one file. The time needed to crack it's the same if the attacker doesn't know the IV. But if you use the same key for different files with differe...
In the Paillier cryptosystem we choose $n=p\,q$ where $p$ and $q$ are primes, $g=n+1$, $\lambda=\phi(n)$, $\mu=\lambda^{-1}\bmod n$. The public key is: $(n,g)$. The private key is: $(\lambda,\mu)$. Encryption: choose random $r$ ($0<r<n$), encryption of message $m$ is $c=(g^m)(r^n)\bmod n^2$ Decryption: $m=((c^\lambda\b...
I have been working on the post-quantum safe ID/signature-schemes of Vadim Lyubashevsky (https://www.iacr.org/archive/asiacrypt2009/59120596/59120596.pdf). I am in particular studying the security proof, and wanting to structure this in a game based fashion. Any ideas on how to approach this in terms of sUf-CMA securit...
I think this question is related to this other question, but somewhat different. Let there be a hidden datum $D$ that we observe using a hash function $H_1$, $h_1 = H_1(D)$. There's another hashed value that we get from $h_2 = H_2(D)$. Is there a way to pick $H_1, H_2$ such that there is another function $G$ that we ca...
Different to the usual adversary use case we do not want to find the hidden key but instead pairs of $(m,c)$ which each fulfill a certain property $f(x)=true$ An example property could be e.g. 42 leading '1' at the bit representation. With brute force we could start at different such messages $m$ and receive an encry...
I have this Montgomery curve $y^2=x^3+10x^2+x \mod 83$ and a point $Q(3,28)$, doubling this point in affine coordinates I get $2Q(61,35)$. Switching to projective coordinates I know that $x = X/Z$ and $y = Y/Z$ and $Z = 1$ at the beginning so $Q(3,28,1)$, following the Wikipedia formulas for doubling in projective coor...
Suppose an adversary wins IND-CPA against ElGamal, They're given public key $h=g^x$, Give a pair of messages $m = [m0,m1]$, Get back ciphertext $(a,b) = (g^r, g^{xr} \cdot g^{m[b]})$, from which they determine $b$ with probability better than guessing (plus some negligible probability): How can such an adversary be u...
Suppose we have a random access machine with $(n+1)2^n$ random bits on its tape. This assumption is weaker than assuming the existence of a random oracle, but using this assumption we can construct a PRG and hence a OWF: take a random seed $s \in \{0, 1\}^n$, and output $n+1$ bits, where the $i$th bit outputted ($i=1,...
I am working with hardware that can store an AES key securely--the hardware can perform AES encryption/decryption using a stored key without revealing the key to the caller. However, I would like to use ECC in my application. For a single ECC key, I think I can do this by encrypting the ECC key using AES, then storing ...
This may be a polemic question, but since I did read the rules of the site and "terms and definitions" appear to be legitimate subjects, I want to raise this because I find this interesting, and I want to find out if someone can give me a new perspective on the matter. Historically, Cryptography was not concerned with ...
What are the advantages of FrodoKEM over other NIST PQC candidates? Also, have any critical vulnerabilities been discovered so far?
I've got the 2nd edition, 3rd printing. On page 35 it lists the steps for signing a document: Alice encrypts her message to Bob with KA and sends it to Trent Trent decrypts the message with KA Trent takes the decrypted message and a statement that he has received this message from Alice, and encrypts the whole bundl...
Bouncy Castle provides 6 different paddings for padding messages. However, I am not quite sure which one to choose from. ISO10126d2, ISO7816d4, PKCS7, TBC, X923, ZeroByte. Given that the native Bouncy Castle API requires the message to be greater than 114 bytes. What could be the recommended padding to be used to pad ...
A protocol I am working with requires $\ell_n$-bit RSA modulus and $\ell_\Lambda$ such that computing $\ell_\Lambda$-bit discrete logs is hard in $QR_n$ (technically $n$ is $\ell_n+2$ bits in the definition of the paper). Note we have the additional structure that $n$ is a product of two safe-primes $p=2p'+1$ and $q=2q...
As far as I know, when someone says 'a reduction is tight', it means that given that there is an adversary $A$ with advantage $\epsilon$ and running time $t$ and another adversary $B$ utilizing $A$ to solve a problem $P$, the advantage and running time of $B$ are apporximated to those of $A$. But here is my question: ...
Please bear with me... I want to store some data in an untrusted location (a server). I will want to share this with other people. I encrypt the data with AES encryption and a 20 character password. Then, if I know the RSA public key of the people I want to share the data with, I encrypt the password with their public ...
Assume a password is hashed with a secure salt, e.g. hash = sha256(password+salt). If the hash and the salt are made public, an attacker can perform an attack by running possible password candidates through the hash function to try and find the correct password eventually. The assumption here is that if the hash functi...
From info provided by Google: Lattice based key pair and signature sizes are roughly 12/2 kb and 9 kb, which is much larger than 256-bit ECC key sizes. The number of q-bits need to break n-bit ECC can be 6n, but it's also affected by some other factors. The difficulty level for adding more q-bits to a computer increas...
As we know the public key is generated from the private key and the process is point addition and point double and so on. If we see a list, it would look like a list of values coming from ECadd and ECdouble. My question is, Is it possible to know whether this value is a result of ECadd or ECdouble? (by just looking at...
This is zero-knowledge proof that show x is not a quadratic residue. I am trying to verify Honest verifier zero knowledge property. My steps were these: Let S be a simulator that does not know how to actually comute NQR(m, .) Bob will choose a random $s$ and will send a $y$ according to the value of the coin b. Now s...
In NTRU algorithm one is supposed generate a vector which is invertible as a polynomial in both $(\mathbb{Z}/p\mathbb{Z})[x]/(x^n-1)$ and $(\mathbb{Z}/q\mathbb{Z})[x]/(x^n-1)$. But is there a mathematical lower bound to the probability of f being appropriate in that regard?
I'm looking for some basic algorithm to: generate a code send it to a website, where after payment a token is generated from the code and sent back, where the token is validated. I'm not sure how to ask in cryptography terms, so I'll explain what am I looking for: I have an app that runs on a watch. I'd like to displ...
Here a cycle is the smallest positive integer such that $f^i(x) = x$. Formally we want to prove that if $f$ is OWF then $\forall p(.)$ and sufficiently large $n$, $Exp(cyc_f(U_n))>p(n)$ where $n$ is length of input. I understand that by applying Markov's inequality we get that, if $Exp(cyc_f(U_n))>p(n)$ then for every ...
I have been working through the introduction to cryptography with coding theory book and have just come across Shamir secret sharing questions. However I just don't quite think I'm understanding it correctly. The question states: In a (2,19) Shamir threshold scheme working in modulo 41, there are two shares (2,14) and ...
I am a beginner in-terms of JWT libraries in programming. How the keypair used (secp256k1) is related with the algorithmic header used for creation of JWT? And why authfusion doesn't need an algorthmic header as such JWSAlgorithm.ES256K (nimbus library) or AlgorithmIdentifiers.ECDSA_USING_SECP256K1_CURVE_AND_SHA256 (jo...
In Vitalik Buterin's write-up on SNARKs Quadratic Arithmetic Programs: from Zero to Hero, he writes Note that the above is a simplification; “in the real world”, the addition, multiplication, subtraction, and division will happen not with regular numbers, but rather with finite field elements I assume SNARKs are used...
I have a very important string it's of around 20-40 words. I want to encrypt this string and store it online . Which encryption algorithm will be useful for me.
I am using AES-GCM-256 to encrypt data in a database, and am using a single key that I salt with a unique random value for each user to encrypt their information. I am using the same IV for all of this. Is this secure so long as I change the key each time?
Encrypting text with a computer has problems: we need to worry about hardware backdoors in processors, motherboards, and extension cards, software backdoors in OS, vulnerabilities in software, and viruses. Computers are so complex that no single person knows every detail of how they work. It makes it impossible to exam...
I have been working through a book on cryptography and have recently come across elliptic curves. This particular question has me stumped and the book isn't much help, unfortunately. I was wondering if someone was able to talk me through the process a little better. The question is: Alice and bob use the prime p=83, a...
I am a developer trying to follow best practice guidance as established by the IETF for my applications. I was researching standards for ECDSA key generation for some work that I have to do in the blockchain industry. I am tasked with creating a unique, less complex zero-knowledge based scheme. RFC Draft Indicating Det...
I have an idea but I don't know if it will work. For the appropriate $p$ it is easy to find $n$ linearly independent $x_i$. Then we compute the inner product between the $x_i$. I think the information is enough to recover the $\boldsymbol{v_1},...,\boldsymbol{v_n}$, because, by matrix it can be written as $\boldsymbol...
I am doing research about Non-interactive Secure Multi-party Computation and encounter a dilemma that I am not quite sure if it is possible and wonder if there are better thoughts that could help. Situation: There are $n$ parties ($i \in [n]$) and a dealer. The dealer has a number $U$ and weights $w_i (i \in [n])$ and ...
refer to this paper Khabbazian Paper I am trying to use double point compression in scalar for example double-and-add with k=27 which need to reduce the multiplications process for example scalar double-and-add algo consumes 4 doubling and 3 addition for P1(3,10) based on this example example I am thinking to take two ...
I am getting started with Homomorphic Encryption libraries. I am trying to port a codebase written in Python to Haskell. I see that there is a re-encryption operation happening in one part of the code. Something like this: def re_encrypt(self, values): n = values.shape[1] values = values.flatten() ret = [...
Does higher encryption mean that my password could be shorter? If the time to decrypt is longer, then the chance to bruteforce gets lower too, right? I've created a KeePass database, and at the creation you get to choose the decryption time (to 100 ms to 5 seconds). I was wondering if this implies a more secure way to ...
Let the following game be given: G^IND-CCA': Prepare a key k <- KeyGen(1^Kappa) Choose a hidden bit h <- {0, 1} uniformly random Prepare a decryption oracle O_Dec. Given a cipher text c, it returns the decryption m Prepare a one-time oracle O_Test. When called with m_0, m_1, it will return the encryption of m_h. Call ...
Have a look at the Twitter conversation below in the screenshots. @theveveshow asks if @trader1sz has sent ETH to the girl in question? @trader1sz responds that the girl in question has indeed sent him ETH. @theveveshow asks for proof. @trader1sz asks if @theveveshow can prove @trader1sz is not his father? How can we...
Following up on my previous post, I thought I might get a more concrete answer if I gave a more concrete question. I require 128-bit security so I choose a 3072-bit RSA modulus ($\ell_n=3072$). Specifically I choose $n=pq=(2p'+1)(2q'+1)$ that is a product of safe primes $p$ and $q$. Now, I want to choose $\ell_\Lambda$...
I created a CSR using ES256(ecdsa). I want to verify it. How do I verify a CSR using ES256? -----BEGIN CERTIFICATE REQUEST----- MIIBCzCBsAIBADAfMQ0wCwYDVQQDDAR0ZXN0MQ4wDAYDVQQEDAVvdGhlcjBZMBMG ByqGSM49AgEGCCqGSM49AwEHA0IABAJA4hRnXwSydejyKYgB349JX/MKueTl6qei Ge7s6Leny05ze4oQWaLS7qsQfJGt/8RPCoymGypU12iakhIUfE+gLzAtBgkqh...
Intuitively I think not because assuming the bit string $x_1,x_2 \sim \{0,1\}^{n/2}$, $x_1 \wedge x_2$ is not uniformly random so if $g$ were still a one-way function then the fact that the definition of one way function requires the input string $x$ to be uniformly random seems unneeded. But I'm not sure how to constr...
Let the modified NTRU be $h=f/g$ such that $f$ is not necessarily a short polynomial, is the NTRU problem still hard in this case?
I'm not into cryptography, but I read a bit about it. I wonder: AFAIK all encryption (decryption) and hashing routines are built using some very primitive functions (let's name them "atoms" for now) with specific properties. As the set of atoms is probably rather small, a suitable algorithm consists of "combining" such...
Shannon's theorem for perfect secrecy states that $$\forall x \in M, y \in C:\quad P[x|y]=P[x] $$ I know we need $|M|\leq |C| \leq |K|$. If $|Μ|=|C|=|K|$ all keys should have equal probs. If $|Μ|<|Κ|$ is it still necessary? I think not because : $$P[x|c_i]=P[x|c_j] \implies \sum_{k_i: E_{k_i}(m_i)=c_i}P[K=k_i]=\sum_{k_...
Consider a scenario where a company wants to release a microdata of their employees total annual compensation for the following year to an analyst in a recruiting firm in order to provide an indication of relative employee importance so that the recruiting firm could suggest similar candidates for hiring to the company...
I have this message "Hello from another world" Can you explain how to encrypt it with CBC step by step? Are the message characters H, E, L, L, O .. converted to binary first, then every 8 bits or 16 bits XORed with IV and passed to the encryption function to be encrypted with a secret key?
Assume a 256-bit ECDSA private key used with Secp256k1 and SHA-256. This key signs multiple different messages in a fully deterministic manner as described in RFC-6979, so signing the same message always produces the same signature. Let's analyze four threat models involving a quantum attacker: They obtain the first ...
I am trying to find discrete log over $GF(P)$ using Cado-NFS (https://gitlab.inria.fr/cado-nfs/cado-nfs/-/blob/master/README.dlp). It works well for random primes. But if I take primes that are divisor of numbers of the form $2^n-1$ for some positive integer $n$, it gives error. I use this in terminal: ./cado-nfs.py -...
I was going to encrypt with AES, But I noticed ECB mode is not safe for CPA. So I thought about preventing CPA by padding input text to a multiple of 16 bytes. First, perform custom padding system: pad input text and secret text for 16bytes "each" like this, so input text will be a multiple of 16 bytes. For example pad...
In order to sign message m, m must be mapped to a point in G.1 However, Point can be multiplied. Why can't I simply do $mG$? Example: $pk = [sk]G_1$ $m = hash(message)$ Signing: $s = m [sk] G_2$ Verify: $e(G_1, s) == e(pk, m G_2)$ Oh, if it is possible to convert G1 to G2, it seems possible to multiply the public key...
The general question is: Why are ABE schemes usually/sometimes proven in the selective-set of attributes model of security? Or even co-selective (both attributes and policy function)? Is it just because of difficulties in security proofs, i.e., reductions? More precisely, what are the limitations of the simulator in a...
I'm a newbie that is studying about JWT using RS256 algorithm for signing and verification. I have drawn a diagram that represents my understanding of how RS256 works. Basically, below is what I have by far: header and payload after being trimmed are both base64url encoded base64url encoded header and payload are ha...
Is it secure to concatenate numbers from an RNG with numbers from a PRNG? I was thinking to throw a dice and use four outcomes to use as real random numbers, one outcome to change to the next permutation, and one outcome to add a pseudo-random number: I generate a pseudo-random shuffled array from all permutations of t...
RSA mathematics: https://youtu.be/4zahvcJ9glg I understand how RSA works mathematically. Can someone explain RSA-OAEP in plain english?
Assume a 256-bit ECDSA private key used with Secp256k1 and SHA-256. This key signs multiple different messages in a fully deterministic manner as described in RFC-6979, so signing the same message always produces the same signature. A quantum attacker obtains the first 32 bytes of each signature. However, the rest of ...
Here are some assumptions on which the question is based. If anything is wrong with this, please point this out straight away: Let's say I have a file I want to encrypt with AES256 symmetric encryption. This requires a 256-bit key. It would be very hard to remember though. In its original form it probably contains char...
The past few weeks I have been trying to solve a difficult problem. I have asked some cryptography experts but unfortunately they had no clue on how to solve the problem. The situation is as follows, an online casino wants to host an online bet, each bet can have a variable amount of players. For this example we will u...
Through " Why do we need to convert hashes to points on an elliptic curve? ", I found out why Hashing to Point is necessary. However, using the algorithm below can sign and verify without Hasing to Point? $a$ is secret key $H$ is scalar hash function Sign: $k = random (mod\ r)$ $r = kG_2$ $s = a (H(m||r) + k)$ : If ...
I'm trying to figure out how to convert a circuit into a Square Arithmetic Program (SAP). This is to eventually use it for zk-SNARKs such as Groth16. I do however understand how to convert arithmetic circuits into Quadratic Arithmetic Programs (QAP). As an example if we have the following circuit $c_1 \cdot c_2 = c_3$....
I am new to lattice theory. I hope(will be grateful) that one could explain to me this claim 7 in REGEV course(this claim appears in this file page 6 : https://cims.nyu.edu/~regev/teaching/lattices_fall_2004/ln/introduction.pdf) which states that : The successive minima of a lattice are achieved i.e., for every 1 ≤ i ≤...
Does Index calculus work on secp256k1? I did a search but couldn't find answers, Can I use Index calculus to find private key of the elliptic curve secp256k1?
I'm kind of confused about this, I have read that nodes in Merkle Patricia tries are key-value pairs, can someone provide a proof of membership for a data in a Merkle Patricia Trie just as he would with a Merkle tree? That is, providing hash of some nodes and allowing the other party to calculate the rest?
I need to use the following scenario: There are 2 keys: AES-key and OTP-key (one-time pad). I encrypt the AES-key (as if it were plaintext) with an OTP key. Then I send the encrypted AES-key to another person who has the same OTP-key on which the AES-key was encrypted. This person decrypts the AES-key. Is it safe for h...
Referring to the AES specification: https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.197.pdf Printed pages 35-37... The first detailed walkthrough is encryption, the second is decryption.... I don't understand what is the third, "equivalent inverse cipher (decrypt)"? How can there be two decryption techniques?
Recently, I've been working on disk encryption. I started with the AES-XTS mode which is the standard for this purpose and tried to understand the concept of disk encryption in general. I know that AES-XTS is preferable from many aspects for disk encryption as long as authentication is not requested. You don't need to ...
I have a small ARM M0 SoC and a smartphone as actors. Encryption keys used are Elliptic curve. My current security is implemented such that: the SoC has 128 bit hashes of phone public keys (vs 512 bit - due to storage space constraints) the phone has the SoC's public key the phone sends its own public key during negot...
I have theses output on curve for jacobian coordinates which I made doubling for (3,10,1) to get (17,21,20) then I made addition for all points to get this results: 1 3 10 1 2 17 21 20 3 11 13 7 4 20 21 14 5 2 6 6 6 9 1 8 ...
In NIST’s ‘competition’ to obtain new public key crypto which resists Shor’s algorithm (aka ‘post quantum cryptography’), two algorithms to make it into the third and fourth rounds have been catastrophically broken (Rainbow over a weekend on a laptop and SIDH/SIKE in an hour on a single core), while others have been sh...
I want to implement proxy re-signature on elliptic curve. I've been thinking about ideas like the one below, but are there any problems? Key Generate: $a = $ alice's secret key $aG$ = alice's public key $b = $ bob's secret key $bG = $bob's secret key $rk_{ab} = aP * b^{-1} = a/bG$ First Sign: $Pm$ is hashed point $k...
I have this password hash: $argon2i$v=19$m=128,t=2411,p=2$hmJvvpH3BZlvb2V1vLm/yf3zANU4qNpKuw5TBnGzo2I$<censored>. I know the password, and I want to verify if this password will produce the same hash the the above. Using an online argon2 hashing site: https://antelle.net/argon2-browser/ My problem is I don't know how t...
I'm developing a desktop application where the users will login with username and password, which is then verified against a database. After the initial login, the current user should be automatically logged in each time the application is started (until the user logs out or 1 month has passed). I could encrypt and sto...
I'm currently looking into pairing-based cryptography and I stumbled upon the definition of the properties bilinearity, computability and non-degeneracy. Now I have a problem with understanding the non-degeneracy and how it is important to the security of elliptic curve cryptography. I have not found a paper that goes ...
What family of bilinear pairing is recommendable for BLS signature when the overriding criteria is compactness of the signature, as desirable for something to be keyed-in from printout, or embedded in a small QR-code? Is there something giving signature size lower than ≈384 bit for 128-bit conjectured security, as in t...
Below is part of AES GCM diagram. However, it only shows the behavior of the IV/counter. The GCM specification examples state both an IV and a Secret Key as two inputs. Can someone please explain where both are used? Is the 96 bit IV expanded to 128 bits, incremented (most-significant byte?) and used to create the AES ...
I am currently studying OFB mode, and one of the vulnerability mentioned for it is that if two different messages have a block at the same position in the ciphertext, and have same plaintext, the attacker can figure out the encryption function output for that particular block. This was brought up to highlight the dange...
I'm following ZK MOOC: https://zk-learning.org/ After some previous readings about these topics, I was believing to have understood that, stated that non-interactivity isn't attainable in standard/plain model, there were to alternatives B-plans: Fiat-Shamir heuristic for public coin IPs requiring the acceptance of ROM...
With PHP, I'm trying to setup a HTTP signature verification for webhook requests coming from BlockCypher: https://www.blockcypher.com/dev/bitcoin/?php#webhook-signing This is their public key: MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEflgGqpIAC9k65JicOPBgXZUExen4rWLq05KwYmZHphTU/fmi3Oe/ckyxo2w3Ayo/SCO/rU2NB90jtCJfz9i1ow== Th...
I'm implementing 128-bit AES-GCM (but only the encryption/AES-CTR aspect). When I set the Secret Key, Plaintext and IV to Test Case 2, page 27 of the GCM spec (see below) I get the wrong value for the output of the cipher block (before we XOR). https://csrc.nist.rip/groups/ST/toolkit/BCM/documents/proposedmodes/gcm/gcm...
I am working on a project for my maths assessment where I research the effect of complexity and length on a given password. Currently, I am working on calculating the probability of guessing a password on the first try. I assumed that I had to start from entropy and go from there but I am kind of stuck on which formula...
I'd like to create a custom type of sortable GUID by concatenating an 8-byte nanosecond timestamp, 6 random bytes, a 1-byte node number, and a 1-byte counter. But, such a precise timestamp can be used to enact very effective side-channel attacks if it can be related to the execution time of other cryptographic operatio...
Say a server wants to hash a password $p$. It would use a secure hash function $H$ and a unique salt $s$ to hash the password as $H(p,s)$. If one has access to the salt, each password candidate requires one run of the hash function to be ruled out; the same amount of time it would take for the server to verify a passwo...
What is a good method to generate random numbers between 0 and n from random bits? For example, I have a one million random bits generated according to NIST SP 800 90 publications. Now I need to generate random numbers between 0 and 100 (inclusive) using these random bits. Few possible methods i could think of are Read...
So I understand how one can use Fiat-Shamir to turn a HVZK sigma protocol into a non-interactive zk protocol in the random oracle model. My problem though is I don't understand why is this useful. If I wanted to use a NIZK in something and I choose a protocol based on Fiat-Shamir, this would mean I have to choose a has...
I must verify an HTTP signature to guarantee the origin and integrity of a webhook data: https://www.blockcypher.com/dev/bitcoin/#webhook-signing This is their x509 PKIX encoded signing key's public key: MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEflgGqpIAC9k65JicOPBgXZUExen4rWLq05KwYmZHphTU/fmi3Oe/ckyxo2w3Ayo/SCO/rU2NB90jtCJf...
I have an application that needs to communicate with the bank for online transactions. I am using OpenSSL 3.0.8.7 in Windows 11. I generated a private key using: openssl genrsa -out rsa_key.pem 2048 Then a Certifate Signing Request using: openssl req -new -key rsa_key.pem -out csr.pem -subj "[REDACTED]" I sent the CS...
In FIPS 186-5 (Digital Signature Standard or DSS) there is a Table B.1 which specifies the minimum number of rounds of Miller-Rabin testing for 1024, 1536 and 2048 bit keys, used for digital signatures. That's already an update to FIPS 186-4 which specified these numbers up to 1536 bits. However there doesn't seem to b...