instruction
stringlengths
32
27.2k
During the TLS 1.3 handshake using the cipher suite TLS_AES_128_GCM_SHA256 a server and client traffic key/iv will be derived using HKDF based on the shared secret, see rfc8446 #7.1 Why is it necessary to derive the key/iv for both the server and client instead of a single key/iv for encryption and decryption?
If we just know the Merkle root and the data block and we want to know this block is a member of this merkle tree. We need to know all the blocks from the leaf to the root that are associated with data block and we ignore the rest. But how and whats the point of this?. If the system is doing so much work finding the bl...
If I understand correctly, Whitebox AES is a way of transforming decryption code to make impossible to recover the decryption key, even if you have access to the code. But what's stopping someone from just separating the entire whitebox decryption function from your program and using it inside their program? They won't...
This is my first post. My interest for cryptography is exclusively motivated by cryptocurrencies. My question is: If I generate some keys, how do I actually verify that the address is indeed associated with that private key (without the need to test a transaction on the blockchain)? Can we apply this for all cryptocurr...
I want to encrypt a JSON file while exposing its interface (the name of the object fields) in clear text. Since this exposes part of the content of the file, my guess is that an attacker could use this to hack the encryption key. Are there encryption methods that can circumvent, or at least be safer for cases like this...
Given that it's otherwise just a truncation, I can guess that being able to compute the 224 value from the 256 value is an unwanted property, but that's just speculation.
What is the ChainOfFools/CurveBall Attack on ECDSA on Windows 10 CryptoAPI (Crypt32.dll) Could someone provide details?
Conceivably, Alice could release a public encryption key and promise to release the private decryption key on a certain date. That way anyone could use that encryption key, combined with others from similar services, and throw away the key so the message will only be readable after a certain proportion of the keys have...
I'm a working programmer (read: a person without a maths degree) trying to get a better grasp on elliptic curves specifically in the context of elliptic curve cryptography (though to be clear, this is for personal development — I'm in no way trying to roll my own crypto). One concept that's difficult to grasp for me is...
I am trying to convert a homomorphically encrypted integer to a homomorphically encrypted binary number (in vector form like {Ciphertext(1),Ciphertext(1),Ciphertext(0),Ciphertext(1)}), which I cannot really get the remainder (and any other "intermediate results") without decryption. Is there really a way to do this?
I'm sure there's a proper name for this, but I have no idea what it is. When my family fled Europe, one of the remaining items are a letter and a key from a bank. The general idea was that whomever has the letter and the key, was allow to open a box that then had ... something that is lost to history. One family mem...
So I was supposed to use hash some co-ordinates and I was supposed to use k 3-wise independent hash functions in order for the mathematical explanations behind that algorithm to be hold. But after using k 3 wise independent hash functions, I got kinda bad accuracy(I used tabulation hashing which I myself wrote for this...
I know it is possible to use RSASSA-PKCS1-v1_5 with client certificates in TLS 1.3. But what about the other way around: using RSASSA-PSS with client certificates in TLS 1.2? Is it possible to use RSASSA-PSS signed certificates with TLS 1.2 at all? Do I have to fall-back to RSASSA-PKCS1-v1_5 during handshake? I searche...
From what I understand about crypto such as Ethereum or Bitcoin, Miners are verifying transactions and being awarded for doing so. Right now Ethereum has some really high gas prices. (Price of transfering eth). I have also found out that it's not really profitable to be a miner anymore unless you have a very high end m...
I remember reading that the RSA algorithm was only permitted for encryption when used to encrypt a symmetric key (essentially leading to hybrid encryption). However, reading through Annex A: Approved Security Functions for FIPS PUB 140-2 this doesn't seem to be an option. Did I mis-remember? Are there any approved asym...
Is it possible to have an encryption scheme that could be encrypted with a particular key, then decrypted with a large amount of keys without massively inflating the size of the final result? I am looking for an encryption scheme that would allow me to encrypt a block of data, then be able to decrypt it with a highly s...
I was reading a book called Serious Cryptography. There is a page saying that block size must be large enough to prevent codebook attacks: When 16-bit blocks are used, the lookup table needs only 2^16 × 16 = 2^20 bits of memory, or 128 kilobytes. With 32-bit blocks, memory needs grow to 16 gigabytes, which is still ma...
Granger et al. recently published a paper about breaking a record for discrete logarithm on the Binary field Computation of a 30 750-Bit Binary Field Discrete Logarithm, Robert Granger and Thorsten Kleinjung and Arjen K. Lenstra and Benjamin Wesolowski and Jens Zumbragel, August 2020 They computed the discrete log of...
Let in ECDSA, $G$ is the base point, $P$ is a public key with the corresponding private key $k$. $G_2$ is another base point, $k_2$ is another private key. $P$ and all variables except $k$ are known. Consider the following system of equations: $\begin{align}[k]\,G &= P\\ [k_2]\,G_2 &= P\end{align}$ Givens: $G = (G_x,G...
I'm facing the problem of implementing pseudo random bit generator (PRBG) on a very low power device. NIST.SP800-22 "Statistical test suite for Pseudo Random Generators" suggests a suite of 15 tests for randomness. Is there a way to use those tests as "randomness measures" except from pass / fail? That is, suppose yo...
I was writing in a document about the flaws of the MD construction which pushed cryptographers to create different and more robust constructions. However, I don't know why HAIFA and Sponge constructions don't suffer from this attack.
I'm learning how CTR mode and there is something I have trouble understanding. If I understood correctly, two components are encrypted with the key, a nonce and a counter concatenated, and it looks like for example a5b1fe9ac36701ba0000000000000003 : 8 bytes of nonce and 8 bytes of the counter padded with zeros. However...
So I am looking for an explanation of an experiment. In this experiment, I took a set of k hash functions. Say the total number of data points I am working on is d. Call an algorithm A which used that set of hash functions to do some operations on d data points and have modified them to a matrix B.It is mentionable tha...
Can Noise be used asynchronously without weakening its security properties? Specifically, there are two users, A and B, who communicate asynchronously by leaving messages for each other on an untrusted server, but they may never be online at the same time. They know each other's public static keys in advance, so the KK...
In the research paper Breaking the Bluetooth Pairing – The Fixed Coordinate Invalid Curve Attack? by Biham and Neumann, 2019, they talk about attacks in Bluetooth pairing, they state that in the pairing process which involves ECDH key exchange- "sending both the x-coordinate and the y-coordinate during the public key e...
This video explanation is great because it shows an example using small numbers, if it wasn't for that example my code would be wrong. Still: the code takes 0.5 seconds to calculate 300 point doublings using 256 bit numbers. I found it's faster to do point addition or doubling using the Jacobi transformation or Weierst...
I am trying to find out and learn more about Balanced boolean functions. Wikipedia states that " a balanced boolean function is a boolean function whose output yields as many 0s as 1s over its input set", and states that an example of this is XOR. I want to know how the same works for multi-output bit functions, where ...
Suppose $S \in \mathbb{Z}_q^{m \times m}$, and the norm of $S$ is less than an upper-bound $\beta$. Additionally, $A_1, \cdots, A_k, C_1, \cdots, C_k \in \mathbb{Z}_q^{m \times n}$. Here, $k \geq m>n$, and $q$ is a large prime. And $S$ is unknown. The following equations are satisfied $SA_1 = C_1$ $SA_2 = C_2$ $\vdot...
In the Dutch "IT Security Guidelines for Transport Layer Security (TLS)" the ciphersuites using AES-128-CCM_8 (i.e. CCM with a 64 bit authentication tag) are considered "insufficient". This is the only reason given: AES-CCM_8 is a variant of AES-CCM with a truncated authentication tag, which has a lower security equiv...
We already have quantum computing, but when quantum computing becomes commercially available there is a problem for many but not all encryption algorithm. The One-Time-Pad or OTP is the one and only true mathematical unbreakable encryption scheme because it provides entropic security. The question is if OTP will provid...
I've been reading this in many places and I still don't properly understand what it means to be "sound". As an example of what I am asking for: The Fiat-Shamir transfrom is sound in the Random Oracle Model (ROM), where hash functions are assumed to behave as Random Oracles. I know that being in the ROM means that has...
I went through this post SHA256 output to 1-6 number range?, this post, SHA256 output to 0-99 number range? and I felt like the exact way mentioned in the first one is really helpful. I am looking for help to generalize the way for any arbitrary integer, in other words, if we want the output values in range of 0 to n w...
So I was wondering about what will be the dependence of the outputs when I padded one input with two different strings two times for technically generating two different strings, say the input string is 123 and the first time I have padded 12 before 123 $$H(12\mathbin\|234)$$ and next time I have padded '24' before '12...
I made a simple python program in the Charm framework (https://github.com/JHUISI/charm): from charm.toolbox.pairinggroup import PairingGroup,ZR,G1,G2,GT,pair group = PairingGroup("MNT224") g = group.random(G1) h = group.random(G2) a, b = group.random(ZR, 2) G1 = (g ** a) ** b G2 = g ** (a * b) H1 = (h ** a) ** b H2 =...
I am looking at ChaCha20Poly1305 WolfSSL. It is noted that the ChaCha20Poly1305 AEAD construction has the property, that it only outputs the plaintext, if the verification of the MAC (Authentication Tag) was successful. I am asking myself whether AES-GCM also can provide this (from a security perspective quite importan...
Goal: I want to implement a paillier algorithm to encrypt images and hide some data reversibly. This is the paper that proposed this algorithm: https://www.sciencedirect.com/science/article/abs/pii/S1047320316301808 (this link can be obtained for free on sci-hub: sci-hub.tw) Question: The paper mentioned that paillier ...
So I need to encrypt a file server-side for transport from server to client and storage on client-side. I'm quite confused as to what I have to watch out for, as it seems like it's insanely easy to screw up really bad. The files I need to encrypt Are binary Sometimes contain big areas of null bytes. Are of medium size...
Suppose that $t_1, t_2, \ldots, t_n$ are my clear texts. Suppose that for any $(i,j) \in \{1,2,\ldots,n\}^2$, $t_i$ and $t_j$ only differ in, say, the 1st $m$-many characters. Finally, suppose that I got an encryption function $\texttt{enc} : t_i \mapsto c_i$. By function I mean a programming function, not necessaril...
I have two questions about the sessions keys generated during the last steps of the Handshake phase: Do the "client write key" and the "server write key" have the same value, even though both keys are generated independently on both sides? (Same question) Do the "client write MAC key" and the "server write MAC key" h...
I have two ciphertexts. Encryption algorithm: DES in ECB mode. Ciphertext: 72EE3532F904CE2AAA966C723C463F294CA8AB1C11E9E0B304BBB6A8E2BD1F34 Plaintext: DetectedSpambotsRemailedMalwares Ciphertext: 90E5AE69FEC309C47D655DE91B0C900B06CF5C4D936FCD0F72EE3532F904CE2A Plaintext: InfectedAccountsSpammingDetected How to find...
I tried implementing the Hessian form of an Elliptic curve over the prime field Fp where, p I have taken as 1051. The curve equation I took is $X^3 + Y^3 + cZ^3 = dXYZ$ with c = 1 and d = 6. Selected (4,2,6) as the base point. Followed the equation (5) and (6) of https://www.iacr.org/archive/pkc2010/60560246/60560246....
As block ciphers are defined as a pseudo-random-permutation over the data (keyed with the key), I was wondering, if there are also constructions for which key and data can be switched and the cipher is a permutation over the key space for a fixed (data) input? So the question is, if the output space of $E_k(a)$ for all...
i'm working on a paper about Machine learning and Deep Learning and i'm wondring about the uses of this domain in cryptography!! so what are these application of Ml that we use in cryptography and the tecniques for that !
I've seen multiple examples of boolean functions being used as a permutation. For example the Keccak Chi : 2.3.1 function: from https://keccak.team/figures.html Or as a formula: for $i=\{0..4\}$ $A_i=a_i \oplus (\neg a_{i+1} \wedge a_{i+2})$ with indexes calculated modulo 5 The first question would be, what is the rat...
Problem statement: "Suppose that users Alice and Bob carry out the 3-pass Diffie-Hellman protocol with p = 101. Suppose that Alice chooses a 1 = 19 and Bob chooses b 1 = 13. If Alice wants to send the secret message m=5 to Bob, show all the messages exchanged between Alice and Bob." Official solution: $a_2 = {a_1}^{-1}...
Does anybody know a point-matching function for curve 25519? Or has a straight-forward way how to derive any arbitrary point-matching function? It should be like a reversible mapping from and to a 128+ bit number to and from points on the Curve 25519. The aim is actually to have the point being on the edwards form of t...
I read a CTF writeup about cracking 4 primes RSA numbers from here: Given $p, q, r,$ and $p+q+r$ are prime numbers. The challenge encrypts the flag with a modulus $N=(p∗q∗r)∗(p+q+r)$ and gives the output $n=pqr, k=p+q+r$. To totally break the cryptosystem, we would want to find the totient of the modulus $\varphi(N)=(...
We know that non-trival deterministic algorithm does not guarantee privacy and randomization is essential for privacy (pp.16 in [Dwork and Roth 2014] ). The well-known $\epsilon$-diferential privacy is defined for randomized (probabilistic) algorithm (see the link https://en.wikipedia.org/wiki/Differential_privacy). ...
What I need is a set of pairs, where the first element of the pair is a 384-bit input (including the sequence of 384 zero bits) and the second element is a corresponding 384-bit output of the Xoodoo permutation. Does such a test vector exist?
I am looking at a scenario where I would like to claim to an authority (call it A) that I am indeed me without revealing my identity documents. I am guessing some zero knowledge protocol has to be used. We can assume a trusted authority where I will show my identity documents for authentication. But I do not want A to ...
Is there any way to make an encryption scheme where you can check whether two values were very similar by only looking at the encrypted values. By alike I mean something like 1113740 and 1123740 are alike. Ideal would if you could make something like a threshold distance in a normed space. Is this possible or will thes...
I try to relate my own calculation with the real result being about 150.738.274.937.250. The plugboard has 26 letters, and you have 10 wires to connect pairs of letters. My idea was to calculate first how many possible pairs you can have. 26*25/2 = 325 [(a,a) not allowed, and (a,b)=(b,a) so divide by 2 to remove duplic...
I try to implement aes-128-cfb myself for learning. To confirm whether my implementation is correct, I want to verify it with a well-known library such as OpenSSL. But then I noticed something strange when I try to use OpenSSL to encrypt. I have file cleartext.txt with the following content: This is cleartext that will...
Recently I'm learning about constructing iO from Matrix Branching Programs via Multi-linear Maps (to be exact, [GGH+13] and [GGH15]). However, I have a small question that I couldn't figure out. It seems like the steps of converting a program/circuit into an obfuscated one is to first convert it into an MBP (a bunch of...
Im trying to implement a sponge in Java. The state starts out as an empty 200 byte array of all zeros. In the KMAC samples document from NIST, the following happens: (black line is a pdf page break) The way Im reading this is that a state with a bunch of zeros was sent into KECCAK, and then a state with apparently ra...
NIST explained the process of "Randomness Testing of the AES Candidate Algorithms" in the document. The document explains the generation of 9 datasets for AES candidates with 128-bit block length and 128-key length. The document also state the number of streams and length of each stream that were set in NIST Statistica...
I'm trying to understand what the smallest possible RSA public and private keys are. When using $p = 2, q = 3$, the encryption function doesn't encrypt. So I have to shift one prime to get $p = 3, q = 3$ and then the private key is $(9, 3)$ and the public key is also $(9, 3)$. I know that it is trivial to factor the pr...
I (ACME Corp) run a SaaS website that charges a USD amount (lets say $1) per file processed. I directly employed a sales rep. (Alice) at 8% commission i.e. she makes 8% of $1 for every file uploaded by customers and processed. Alice in turn sub-employed a sales rep. (Bob) at 3% commission (making Alice's actual profit ...
Here is a backgroung for the question on hand. While studying RSA I came up to the question about what happens if $p$ and $q$ involved in modulus computation are not actually primes? There is already a related topic on this (Why does RSA need p and q to be prime numbers?). While most of the answers boil down to efficen...
In short: with AES encryption can an attacker create a new key2 and plaintext2 so that AESkey1(plaintext1) = AESkey2(plaintext2) If so, can it be solved by just applying for instance a MAC like AES-GCM or an AES-CTR with a SHA256 HMAC? Intended application: The encryption of a file. Every client having the key can decr...
Client and Server both know the Client's password. Client wants to login. Server sends Client a random string. Client concatenates the string with their password. Clients sends the HASH of this to the server. Server performs the same operation without sending the hash anywhere. Server verifies their resulting hash e...
Let vector ${\bf d} \in \{ \pm 1 \}^n$ be the message we want to send. In my system, ${\bf d}$ is multiplied by an $n \times n$ Fourier matrix ${\bf F}$, as follows $$ {\bf x} = {\bf F} {\bf d} $$ where $$ {\bf F} = \begin{pmatrix} 1 & 1 & 1 & \cdots & 1 \\ 1 & e^{jw} & e^{j2w}&\cdots & e^{j(n-1)w} \\ \vdots ...
I am writing a program that encrypts data in Python and heard about padding oracle attacks, but I think they are overrated (I mean, what are the real-world uses?) even for the old implementations that are vulnerable (the ones that tell if padding is right or wrong like SSLv3). Because: If all I need are two ciphertext...
I want to verify my knowledge of sensitivity. So in $\epsilon$-differential privacy, the noise is added with the Laplace mechanism depending on the sensitivity and the privacy loss parameter. Laplace takes into account the global sensitivity and the noise is scaled on the L1-norm, ιn $\epsilon-\delta$ differential priv...
I understand that hash functions used for hashing a document or some data before signing it, needs to be collision resistant and 2nd pre-image resistance. Otherwise an adversary could "look" for two random documents with the same hash or for a second document, having the same hash as a given document, and just replace ...
This is a rather general question, but I'd really appreciate your (experts, in my view) opinion on this subject. I was wondering if, using current tech like machine learning, quantum computers and ultrafast GPUs, are we anywhere closer to deciphering the (in)famous 340-sign Zodiac letter which he sent to the press in N...
The dragonfly key exchange scheme (as used by WPA3) received criticism because the way it chooses a generator of the elliptic curve group ('hunting and pecking') is a non-constant time algorithm making it vulnerable to side-channel attacks. My question is: Why is hunting and pecking used at all? Assume there is a known...
According to point 10.6.4 (Encryption in Transit) in Security Standard –Use of Cryptography, one of the criteria for key renegotiation is timeout , Encrypted sessions MUST re-negotiate new symmetric keys after one of the following criteria is met: The “counter” in CTR or GCM mode has exhausted all possible unique val...
I am trying to decrypt a text(~900 characters) and I started with the assumption that its a Vigenère cipher as the one of the identifier tool identified it as Vigenère cipher and also the Index of Coincidence (IOC) for the ciphertext is 0.04492. So I used another tool to check the IOC values for different key lengths (...
I have studied about the mono-alphabetic substitution cipher. With Character frequency graph, the encrypted text can be decoded. I am wondering how can be happen?
I'm trying to understand how man-in-the-middle attacks are prevented during key exchanges, and am confused by this Wikipedia statement: Use of mutual authentication, in which both the server and the client validate the other's communication, covers both ends of a MITM attack, though the default behavior of most connec...
In an RSA-OAEP encrypted symmetric Key (AES for example) message. The message is then decrypted by the other party when R is a Random Number That other party doesn't know about. so How it can retrieve back the key when it's XORed with A Hash (hash1) That it doesn't know. I don't think that output of Hash2 helps with an...
Shuffle proofs enable a prover to show that a vector of commitments or encryptions $(c_1, \dots, c_n)$ is permuted into a vector of commitments $(c'_1, \dots, c'_n)$ without revealing the permutation itself. There are plenty of papers dealing with this topic. I am aware of the two commonly named applications: Voting, ...
I have a binary signed with ECDSA384 and I need to verify it using a particular cryptography library. The first thing that needs to be done is to initialize the EC public key, which involves setting several parameters 'manually'. These parameters are the ones that make the following EC equation: Elliptic Curve equation...
RSA-KEM is introduced by Yuliang Zheng and Jennifer Seberry 1992, Practical Approaches to Attaining Security against Adaptively Chosen Ciphertext Attacks and compared the security against OAEP variant by Jakob Jonsson, in 2002 2002, An OAEP Variant With a Tight Security Proof – Draft 1.0 I've found some documents t...
I'm currently writing my own implementation of Diffie-Hellma n(This isn't for actual use. This is strictly for me to get a better understanding of DH by doing it myself.) For the prime and generator, I am using RFC 3526, more specifically the 4096-bit prime. My question is, is there a specific standard secret integer g...
In the Generic Group Model (GGM), a concrete cyclic group of (known) order $n$ is replaced with an idealized version: a random encoding for group elements is chosen, and the adversary only gets access to the encoded form of any input group elements (such as the generator/public key/...), and an oracle to apply the grou...
I want to generate a valid signature for a message using the below algorithms: Hash function: $H(x) = (x+3) \bmod 10$ (I am unable to understand the given parameter for hash function and how am I supposed to use it in hashing a message.) Encryption: RSA with the following parameters Private key: 11 Public key: 5 Mo...
Unlike pretty much every other signature scheme that I am aware of (excluding Picnic, the original SPHINCS, and SPHINCS-gravity) SPHINCS+ requires that the whole message be available during the signing operation. This is because it uses a "message randomization value" which if I am not mistaken it is used in order to a...
Assume we should apply an hmac sha256 on different messages made of incremental numbers (Ex. 1 to 1 billion). Does it make sense in terms of security to apply a different fixed key for each message? message 1 key X1 message 2 key X2 ... message n key Xn Will applying a key for each message impact the collision rate? If...
I'm checking an image in every way I can for steganography. I've checked the file signature, compared it to it's original source and extracted the pixels, many methods but nothing's coming up. Apologies if I say something that isn't right because I'm very new to cryptography, especially steganography. However something...
I opened this post in stackoverflow some time ago where I explained a problem I had about not finding a way that would allow to successfully get the result of a string encrypted with a "aes-256-cbc-hmac-sha256" algorithm. As seen in the answer, the encrypted string is exactly the same as it had been encrypted with just...
To tell the exact entropy of a source, all I need to do is to use Shannon's formula $\sum -p(i) \lg p(i)$, where $i$ is the $i$-th element of the alphabet emitted by the source. Therefore, the only thing that keeps me from telling the exact entropy is not knowing $p$. So, the problem of estimating entropy reduces to ...
In my journey of interest in the world of homomorphic encryption has led me to a concept floating around the internet where they describe homomorphic encryption being used with "mobile agents", which in and of itself a fascinating subject, but I digress... Specifically from one paper... Homomorphic encryption [is] a...
I am wondering if there's a polynomial time algorithm that, given a lattice $\Lambda$ with basis $\mathbf{B}$ and a point $x$ in space, it tells you whether $x$ is in $\Lambda$ or not!
I've been reading too much, and I still haven't found the explaination I so crave. I'm looking specifically at zk-SNARKs, as implemented by ZCash. They say they use homomorphic encryption in their non-interactive, zero-knowledge proof systems, which I am just beginning to understand, but am very fascinated with. I've e...
Everything I've seen so far in modern implementations (the Linux Kernel AEAD API, JVM crypto provider (AES-GCM), RFC 8439, libsodium, etc) seems to imply that only symmetric key block ciphers are used in practice for AEAD. Are there asymmetric key algorithms that ensure authenticated encryption?
During the last stage of decryption of a chosen ciphertext attack we are left off with this equation $$c = m \cdot t \pmod n$$ Removing all exponents like $d$ and $e$ where $c$ is the decrypted message which (doesn't mean anything), $t$ is the message we multiplied original ciphertext with, $m$ is the message we want. ...
There are two typical secure multiparty computation paradigms using boolean circuits, namely garbled circuit and secret-sharing-based boolean computation. It is well-known that garbled circuits can be constructed layer by layer, in which each garbled gate has a fan-in of two and a fan-out of one (i.e., two input wires ...
Can someone please tell me why in R-LWE we always make use of Cyclotomic fields, and specially those with degree equals to a power of $2$? Can we use another fields without losing in hardness of the problem? What about Quadratic fields for example? Thank you!
i got open text 414243( all in hex format) encrypted in 6B7F7C. Is it somehow possible to find ouy key? And how can i find open text if encrypted text is 496B4D. Would appreciate any information,there is not so many about this cipher on the Internet. Thank you!
I'm trying to reconstruct the fairly well-known RSA timing attack by Kocher. I'm working with simulated timing data, so I have completely noise-free "measurements". My attack is successful in guessing the exponent, as long as I use a "right-to-left" square and multiply method, i.e. an algorithm as follows (R=b^d mod m,...
I've been reading about safe primes and their use in: Cryptography Engineering by Niels Ferguson, Bruce Schneier, and Tadayoshi Kohno. Having a safe prime $q$ with $q=2p+1$ where $p$ is a Sophie Germain prime They claim that the elements of the subgroup $p$ are the elements that are preferred to be used. Why? Why not t...
The specification here seems quite clear, but unfortunately I'm still doing something wrong... I have this (single small c++ file) repository which very straightforwardly follows the password/wallet verification process. However, the result of my cryptographic operations do not match with the wallet's mac key (the sign...
For prime number generation, one can use a probabilistic prime number generation algorithm like the Miller–Rabin primality test that will yield a composite as a probable prime with probability $\frac{1}{4^r}$ for $r$ rounds. If we use $r=50$, this has probablity $2^{-100}$. This is enough to believe that it is prime du...
I make a website with authentication. I have studied a lot of answers to these questions, but I still don't understand what is better and safer to use for a website: Argon2i or Argon2id? I know which attacks they protect against, but unfortunately I don't know which ones are dangerous for the website. The only thing I ...
What is the general rule if there is one that allows the encryption of a plaintext message to ciphertext message to be able to mask duplicate or repeated letters in the plaintext. This is an arbitrary example plaintext: mississippi to ciphertext: xkvsdoputyp Additionally, for the example above can you give a detailed e...
Let's say we will choose some 256-bit random $b$ and we will find the smallest $d$ such that: $\frac {2^{d}-1}{b} = s$ Now compute $z \equiv s \pmod{2^{128}}$. If I will give you only $z$ - is it possible to compute $b$ in some acceptable time? Is it hard problem? Do we know some algorithm to compute it? Is it save eno...
The following is in the context of secure MPC. Suppose that there is a functionality $f(x,y)$ which outputs 'answer' with probability $1-\textrm{negl}(n)$ for some security parameter $n$, and 'other answer' with negligible probability. Consider a Simulator $\mathcal{S}_1$. Now wlog, if I show that $\textrm{view}_1(\Pi)...
Question I want to create a secure channel between a server and a client. It is only important that the client can verify the identity of the server, not the other way around. In my special case, an ephemeral public key of the server is sent to the client in a first message via a QR Code that is shown on the server dev...