instruction
stringlengths
32
27.2k
Could anyone guide me on how to implement FPE (Format Preserving Encryption) for Email address masking? For example: if my ID is Poornima1@gmail.com then it should be encrypted something like asdfghjk4@zxcv.qwe Preserving the format and datatype.
My understanding of how /dev/urandom works is that the kernel collects true randomness from a variety of sources, and mixes them together to remove statistical bias. It does this at regular intervals to refresh the entropy pool. The CSPRNG then takes a subset of these bits to generate random bits for consumption. My qu...
Lets say we use RSA as the signature method. Alice wants to send a message to Bob and uses RSA signing. For that she signs her message with her private key. But everybody could now have access to her message if one just decrypts the signature with Alice's public key. What is the point of digital signatures if confident...
I could not understand one step in correctness proof of paper titled "A tree-based CP-ABE scheme with hidden policy supporting secure data sharing in cloud computing" authored by Runhua Xu, Yang Wang, Bo Lang. Link to paper: https://www.researchgate.net/publication/271482056_A_Tree-Based_CP-ABE_Scheme_with_Hidden_Pol...
Suppose that we want to implement the following equations in binary finite field. $$ \begin{array}{l}\tag{1} y_{{1}}=x_{{1}}\oplus x_{{2}}\oplus x_{{7}}\oplus x_{{8}},\\ y_{{2}}=x_{{1}}\oplus x_{{2}}\oplus x_{{6}}\oplus x_{{8}},\\ y_{{3}}=x_{{1}}\oplus x_{{2}}\oplus x_{{7}},\\ y_{{4}}=x_{{2}}\oplus x_{{8}}. \end{array}...
Is there a way to prevent the shared secret to be a small value (eg 4) to avoid easily succeeding brute force attacks? In $g^a \bmod p$, I understand that choosing $p$ not a multiple of $g^a$ is a first step. But other than that, are there fast ways to achieve that goal? Thanks
I'm newbie in the word of TLS, and need some verification about my picture. I can use TLS with 3 or 2 participants: 3 participants: Client, server, CA (certification authority). The CA is where the server's certificate is signed in, or created by a CA comp. The browser trusts in it automatically, because they have som...
I try to understand the private and the public key concept, and need some validation about my statements: If I encrypt a message with public key, I can only decrypt with private key. If I encrypt a message with private key, I can only decrypt with public key. I can generate public key (derived key) from private key(b...
To my knowledge it works like this: The server receives the username-password values over a secure & encrypted channel. The username-password values are decrypted in the server and are present as plaintext. With the username the according salt gets retrieved for the user. The salt is appended to the plaintext-password...
Let's say that I have to use fractions instead of integers and I am using Paillier cryptosystem. So, I use scaling to obtain integers. Assume that I have a secure division protocol. What happens if the result of the division is not an integer? Scenario: The scaling factor is 10. $x = E(10)$ // encryption of 1 $y = E(3...
I'm trying to categorize my knowledge. Can I place block ciphers and stream ciphers under symmetric with RSA/DH under asymmetric?
In this paper Maurer and Aggarwal showed that in generic model of computation breaking RSA is equivalent to factoring. It is also known that the LSB of an encrypted message is as hard as breaking RSA.(i.e If there is an algorithm that find the lsb of the message m from the ciphertext c, then we can recover m). So I was...
Suppose that Alice has attributes A, B and C. I have a ciphertext with this policy: A AND C. Can an adversary guess the attributes and then decrypt the ciphertext? What is the probability of guessing attributes in a ciphertext policy attribute based encryption?
I have a following use case: User has his master public (pk) - private (sk) key pair (Ed25519). In DB we store a public key. Is there any derivation mechanism D, where when knowing a derivation parameter x we can use it derive a new private key sk2 = D(sk, x) and public key (knowing only public key in DB): pk2 = Dx(pk,...
RFC 7539 says: A 96-bit nonce -- different for each invocation with the same key It doesn't explicitly say whether it has to be random or not. If we use an ever incrementing counter. Would that be secured? Generating cryptographically secured random number is a slow process.
In A Generic Approach to Invariant Subspace Attacks the authors defined an invariant subspace as: $$F(u + A) = v + A$$ Where $F:\mathbb{F}_2^n \to \mathbb{F}_2^n$,$u, v \in \mathbb{F}_2^n$, and $A$ is a linear subspace. Then they claimed that if $M\circ F = F\circ M$ for a linear subspace $M$ then $A:=ker\left(M+Id\ri...
Is this question valid as $n=100$ is not a product of two primes, but can be expressed as $100=2^2 5^2$, if valid is there any criteria for choosing $d$ and other values?
Consider the following modification of the Blum-Micalli construction (denoted by BM): $G_l(x) = f^l(x) || BM^l(x)$ I am asked the following questions about it: Show it is a PRG of fixed stretch for every fixed $l$ polynomial in n. Discuss the advantages/disadvantages of outputting also $f^l(x)$. In particular, consi...
I'm implementing Salsa20 in Rust for fun. I have the initial state (4x4 32-bit matrix) setup from the key, nonce, and stream position 0. I'm using the Wikipedia Salsa20 article as reference, and I'm confused on how to encrypt the first block. QR is applied on the 4x4 matrix, but how do I "mix in" the input? Is there a ...
Recently I've been learning about cryptography and so far I am loving it. However, there are some things I do not comprehend. As far as I know, RSA was published in 1979 while New Directions on Cryptography by Diffie and Hellman was published in 1976. What I wonder is, what motivated the creation of RSA? Was it becaus...
Consider a function to create a tamperproof cookie as follows: $$\text{cookie}(m, k) = m \| \text{hash}(m \oplus k)$$ where $m$ is a message provided by Alice, and k is a secret key known only to Bob. Bob receives m from Alice and returns the cookie to her. $\text{hash}(m \oplus k)$ functions as a MAC. Why doesn't this...
I've been looking into RSA and the attacks against weak implementations of it, such as when $e$ is small and there's no padding. On Wikipedia, the following attack is outlined for small $e$ values: When encrypting with low encryption exponents (e.g., $e = 3$) and small values of the $m$, (i.e., $m < n^{1/e}$) the resu...
I see a statement like this on a product's download page: "The signature for setup-x86.exe can be used to verify the validity of this binary using this public key." where each this above is a hyperlink. I thought the purpose of a sig is so that you could verify the validity of a document. So what's the purpose of such ...
I have a use case of symmetric encryption with a single-use random key K known only by the sender and the receiver: In my scheme, Bob is able to send beforehand a tiny amount of information to Alice. Alice must send her data through Eve, which is an untrusted network. V is the "address" of Bob (not secret): a single-u...
My area of research is algorithms for calculating optimal addition chains. I have a new high performance algorithm that at its core benefits from estimating the number of set bits ($v(n)$ Hamming weight) in a solution to the Frobenius equation. So for example with a given $n$ and $a_i\geq 1$ if $n=\sum_{i=1}^z a_i x_i,...
It's my understanding that LUKS encrypts data by using a randomly-generated master-key, which is then itself stored encrypted by my passphrase. When I want to access the data, I use my passphrase to decrypt the master-key, which is then used to decrypt the data. Question: Is it possible to have LUKS just encrypt the da...
This question does have to do with cryptography, but not necessarily with encrypting meaningful data. This is my first post here, so if I'm going about this question incorrectly please let me know. Some quick back story: I have a regular volume of hard drives that I need to wipe. I'm not wiping DoD stuff, and I really ...
I was (re)reading the paper "Practical Covertly Secure MPC for Dishonest Majority–or: Breaking the SPDZ Limits". One of the key points in this paper is that they present a covertly secure BGV key generation protocol (Protocol B1, p15). The public key is revealed, but the secret key is full-threshold secret-shared among...
Because a block cipher is a PRP and thus bijective, the fact that the input in CTR mode never repeats means that each block of keystream will be unique. This creates a distinguisher from random data following the birthday bound if enough data is encrypted even before the counter repeats, especially if the block size is...
If I use for example AES-256 (GCM), and my message is bigger than 256 bit (broken into smaller 256 bit blocks for encryption), should the IV change for every 256 bits of the message?
I've noticed that the original HKDF in rfc5869 defines a feedback loop. So the pseudo-code is something like: for i = 1...n out[i] = HMAC(key, out[i - 1] + i + info) However, the NIST recommendation 800-56C seems to only depend on a loop counter for each round: for i = 1...n out[i] = HMAC(key, i + info) From ...
I get the message "Secure Renegotiation IS NOT supported" if a TLS 1.3 cipher will be chosen at a TLS handshake with openssl s_client. Since TLS 1.3 does not support renegotiation at all I assume that this message can be ignored. Is my assumption correct?
I study this article: How to Hack a Mac Password Without Changing It and get interested in what hash algorithm is used for hashing user accounts passwords in macOS 10.12+? My hypothesis is that it is PBKDF-SHA512.
Why do we say shift cipher is perfectly secure when it is easy to break it (source)? Let's say I have a plaintext. "Australia is a big country"; I encrypt it using a shift of 2; That ciphertext can be broken using brute force search over 26 numbers.
Question: Is there any cryptanalytic leverage to be had from the fact that some of the 56 "raw" keybits of DES are used more & less often than others? Observation: over the course of the 16 rounds of DES each of the eight DES S-boxes is used 16 times, so there are a total of 128 S-box "instantiations" or "instances". ...
We know that if the decisional Diffie-Hellmann problem is hard then the Elgamal encryption is CPA-secure. One show that if the chosen group is $\mathbb{Z}_p^*$ then the decisional Diffie-Hellman problem is not hard. For instance, one realizes that $g^{ab}$ is a square with probability $3/4$ with an argument based on th...
I am using python and libnacl, which is a libsodium wrapper, to develop an application where users can deposit encrypted data. Alice uses libnacl.sealed.SealedBox(keyBob) to encrypt her message and uploads it to a database for Bob to download it. Bob and Eve can read the database and observe there I a new entry. Neit...
I am using OAEP in a project and I want the resulting number of bits (n) to be 288 bits. Most of the implementations online seem to be for 1024 bits and using SHA-256 and I was wondering if truncating the number of bits in the G and H functions and then xoring would result in any security issues such as an increased pr...
I was trying to decrypt a text encrypted with AES and ECB mode. I did try several keys and IV. I solved it by ignoring IV. (The IV was given, but it was maybe a distraction) My question is in which cases IV is needed and in which is not?
I need some orientation to solve the following problem: Let $p = 2q+1$ be a safe prime and $s(x)$ the smallest of the two square roots of $x$ modulo $p$. Then: Determine the distribution of $s(g^{ab})$ for $a,b$ chosen uniformly in $\mathbb{Z}_q$. Explicitly formulate Elgamal wrt $\mathbb{QR}_p$ modulo a safe prime $p...
Say Peggy wants to prove to Victor that she knows one of his passwords. She doesn't want Victor to know which password she knows, because she knows that some passwords are more valuable to Victor than others, and wants to keep the advantage that Victor doesn't know which of his passwords she knows. Victor wants to veri...
Is there already a cipher which uses a method like vigenere yet the shifted encrypting alphabets are mixed? i.e. ASDFGHJKLZXCVBNMQWERTYUIOP BNMQWERTYUIOPASDFGHJKLZXCV CVBNMQWERTYUIOPASDFGHJKLZX etc.
Let's say we have a randomly encrypted message and I pasted the contents of that message on a blog for some reason I do not share the key. Would you be able to figure out the key? This is the message not encrypted: This is the message. This is the encrypted message: -----BEGIN OneTime MESSAGE----- Version: OneTime ...
We talk of related keys and related key attacks, but what is a 'related key'? So in three related parts:- How can one key be related to another key? Is there a metric describing the degree of relationship? Is there a link between the nature of keys' relationships and any specific cryptographic functions?
This is something that is needed while generating additive shares ($D_i$) for decryption key (represented by $d$) where each additive share must be coprime with respect to $p-1$ i.e $\gcd(D_i , p-1) = 1$
I read the Helios Paper Helios: Web-based Open-Audit Voting. In section 4.4 Anonymization they are saying that "once the voting period ends" the admin can "shuffle" (re-encrypt and permutate), "shuffle proof", "decrypt" and "decrypt proof" and then finally do the tally. I tested an election and none of these tools were...
I would like to know if deriving a key from a pseudo-random string with a single iteration is secure. Concretely, I am designing a system where a secret key is derived in the client side, and then sent to the server for authentication. The steps are as follows: User enters email and password Derive k0 <- pbkdf2(passwo...
I everyone, I am considering an RSA encryption over the multiplicative group $G = (Z/nZ)$ of the ring $Z/nZ$, where $n = pq$, and $p$ and $q$ are distinct odd primes. First, I want to prove that $H=\{x^4|x\in G\}$ actually is a subgroup of $G$. Next, I am assuming that there comes a probabilistic polynomial-time algor...
I am trying to figure out the best parameters for Argon2 for password hashing. I have read the RFC and the recommendations they put into it. So I follow up on the recommendation on the paper depending on my target machine. The thing is that one single call fits perfectly into the desired time. However, they never ment...
In the SHA-3 standard (page 31) the security of SHA-3 is defined quantitatively, for example, they are saying SHA3-256 provides 256 bits of preimage resistance. How is this number of bits to be interpreted? The definition of preimage resistance that I know doesn't speak of bits, but of a running time $t$ (and a success...
I am designing a protocol where a user A sends a time-locked deposit to user that if the user B within time t provide a proof that he exists in a location x (this may be obtained by third party like Google), user B can get the deposit of A. Otherwise, A can get his money back. Any help of how to do that using cryptogra...
I am writing a small chat program to explore some methods and concepts in cryptography and currently I am using a shared AES key tunneled with RSA which upon further reading revealed many flaws both in the mode choice and the concept itself. So after some more videos, articles and posts I decided to implement 2 ECDH p...
A key schedule that generates round keys by XORing a round constant with the key is linear and can be vulnerable to related key attacks, but let's ignore that for now. Constants are necessary to avoid the slide attack. How complex do these constants need to be and how much must they differ? For example, would a trivial...
This is needed because I use a random function to generate the encryption key in RSA setting to generate random numbers and check if $\gcd$ is $1$.
I am trying to solve the BM algorithm to find the shortest LFSR and the feedback polynomial but i keep getting stuck. Is there anybody who could solve any binary code so the steps could be little clear. I had seen the algorithm on Wikepedia but too many letters without any implemented examples are very confusing for me...
I'm somewhat new to encryption. I see that the actual RSA sizes are 1024 and 2048? Can those key sizes support data blocks of 128 MB?
Under the definition of Gennaro et al (link), a DKG protocol needs to satisfy “correctness” and “secrecy”. Correctness is divided into three sub-properties: C1. All subsets of $t+1$ shares provided by honest players define the same unique secret key $x$. C2. All honest parties have the same value of public key $y = g^...
This is my first question here, so if I ask it to the wrong group or otherwise infringing the (written or unwritten) rules of the community, please bear with me. My problem is this: In an exercise in futility, I am trying to write a small program (in C) that implements the DES (FIPS 46-3) standard. I stumbled upon that...
Trying to write a C program that implements the DES standard (FIPS 46-3). I am unsure about how the standard should be interpreted when computing the various permutations specified in the document, with regard to the external data that is loaded in the algorithm. For example, the IP (Initial Permutation) takes the 64 ...
Diffie-Hellman works as follows: Given public parameters $p$ (a large prime) and $g$ (always referred to as a generator of $(\mathbb{Z}^∗_p)$. Then: Alice randomly chooses $a<p$ and sends $A\leftarrow g^a \mod p$ to Bob; Bob randomly chooses $b<p$ and sends $B\leftarrow g^b \mod p $ to Alice; Alice computes $S\leftarr...
In the process of doing some research, I stumbled across the following two claims on the PokerStars website. We do record all of the hole cards in all real money hands. This is an important tool to help us investigate fraud and collusion. However, this information is not accessible to anyone until after the conc...
I'm looking to identify the EC key derivation method used in Hyperledger Fabric. I can't find anything in the docs or the protocol specs, but the functions' code is here for the private key and the public key. The derivation function seems to be very simple, DerivedPrivate = MasterPrivate + (k+1) and DerivedPublic = Ma...
I would like to know if splitting a key generated by PBKDF2 to derive two keys is a safe practice. Concretely, in my system, I need to derive two keys. One for symmetric cipher used in the client side, and one for authenticating the user by sending to the server. The first key is never sent to the server so that only t...
Alice sends Bob a message using AES-GCM. Bob is a software developer with just enough cryptography knowledge to be dangerous. He wants to start processing data as soon as he receives it. He observes that he can ignore the tag and just decrypt the CTR-mode ciphertext. In every mode I can think of it is possible to decry...
One can have a NIZK proof for DLOG by applying Fiat-Shamir heuristic to Sigma protocol, such that one can prove non-interactively that $x$ is discrete logarithm of $X = g^x$. Then, in simulation based proofs, the simulator can extract the witness $x$. What interest me is whether a party $P_2$ given $X = g^x$ and DLOG ...
I like the idea of a Zero Knowledge range proof. But I read that, to prove my age in a range, a commitment is required by a trusted party (TP) stating my age. How does that work? is the commitment a certificate from the TP? Also, if I need a user “A” to prove to the verifier his current location (longitude, latitude) i...
My understanding of an ideal block cipher is as follows: For a block cipher with block size $n$, there are $2^n$ possible plaintexts. The number of possible keys (mappings) would then be $2^n!$. The size of a single key would then be $2^n$ because you're choosing one full permutation from the set of all possible permu...
I'm confused about what terminology to use. I see people referring to such a cipher-MOO combination using both terms.
I'd like to avoid sending user passwords over the wire. Would the following challenge response protocol be secure (served over TLS)? I know this is similar to SRP. Sign-up Client takes password and randomly generated salt and inputs them into scrypt. Client takes scrypt output and uses it to create a signing keypair u...
Using MD5 or SHA1 for instance, and applying integers (as seed so to speak) to the hash function, in sequence, and only keeping, say, the first 64 bits of the resulting hash, do we always have a probability close to $1/{2^{64}}$ to have $$\text{hash}_{64}(n) = \text{hash}_{64}(n+1)$$ for every $n\in\big[1,2^{64}]$?
Why don't we use a Hill cipher of 100 × 100? Or even bigger? That would be close to unbreakable. The number of possible keys in a 2 × 2 Hill cipher is 157248. For 100 × 100 the number is beyond limits.
in the literature I have found some algorithms mentioned as ZK and Fusion in image steganography. But I couldn't find any detailed information about these algorithms. Could someone please help to resolve this?
I read that Schnorr protocol cannot be proved zero knowledge on that link: Perfect zero knowledge for the Schnorr protocol? Could any one suggest alternative Zero knowledge proof protocol so a prover can prove to a verifier that he knows the private key corresponding to a particular public key?
Sorry for my dumb question, as I'm not crypto guy. Is there any algorithm, which allows to encrypt some message with the public key, but the associated private key is only valid for specific period of time? E.g. private key is valid till 2018/01/01, and after that date I'm unable to decrypt the message with that privat...
We know that the Totient function is multiplicative. Which means that when $p$ and $q$ are relatively prime, then $\varphi(p q)$ is equal to $\varphi(p) \varphi(q)$. My question is, are only prime numbers used in RSA or can they also be coprime like e.g. 11 and 16? I am asking this because I understand why RSA is multi...
In a given public key cryptosystem, if the problem of determining the private key from the public key is NP-complete or co-NP-complete, does that imply that NP = co-NP? Complexity theory is definitely not my specialty. I ask because from what I read that it seems that this would be the case (informally): Determining t...
I understand the purpose of the SubBytes layer (confusion) and the ShiftRows and MixColumns layers (diffusion). But I don't see the purpose of having more than one key addition layer. What I've been able to find is that it can mitigate side channel attacks if the AES implementation leaks information, but I don't see th...
As far as I know, a secret key corresponding to a given public key is not unique. So, for example, there are actually multiple secret keys that can produce the same digital signature under RSA signature scheme. What I wonder is, how can I compute the expected time to find a matching secret key of a given public key? I ...
Diffie-Hellman groups are vulnerable to sieving precomputation attacks. These attacks allow a one-time computation against a given DH modulus that makes it practical to attack all subsequent key negotiation operations using the same group. It is speculated that, at least in 2015, it takes only $8M USD to build ASICs ca...
Consider a public modulus that is supposedly 4096 bits. But since it contains two hex pairs of zeroes, i.e. ...:00:...:00... such that the bit length of the decimal value instead becomes 4093 bits, is it actually a 4096 bit key or not? I hope my question is vaguely intelligible. Edit: modulus is here https://pastebin.c...
I am developing an algorithm that uses a lookup table to process the data, I want to know how many unique tables can be created. If I have a table of 256 values I know that 256! would tell me how many tables are possible, but the math of the algorithm moves forward or backward along this table based on the calculation ...
I read that paper Efficient Protocols for Set Membership and Range Proofs of Camenisch et. al that describes the zero knowledge range proof. The paper applications looks interesting like if you want to proof your age between a range without stating exactly what is the exact age? But I read that a commitment (C) provide...
From this answer, I see that from a mathematical point of view, one could define the $\text{Keccak-}f[25w]$ permutation for an arbitrary value of $w$. I am interested in the following question: disregarding all properties of the resulting function except the invertibility (because $\text{Keccak-}f[25w]$ is required t...
In my free time, I write an algorithm for fun (and it may be the best hobby I had so far). Currently, the output this algorithm produces is indistinguishable. I ran multiple analysis process and asked two mathematicians to double check that part (no definite answer but pretty good so far). But the inherent problem is t...
This is a quote from my cryptography notes: If $h$ is a random function oracle of output length $n$ then also the two KDF constructions: $K(x) = h([0] \| x) \ldots \| h([L] \| x)$ $K(x) = h(x \| [0] ) \ldots \| h(x \| [L])$ yield random function oracles of otput length $L \cdot n$. They call this property domain sepa...
I have a plaintext "monday" and ciphertext "IKTIWM" and $m=2$. I want to find the key of the Hill cipher. I made a matrix $$ \begin{bmatrix} a_1 & a_2 \\ a_3 & a_4 \end{bmatrix}\begin{bmatrix} m \\ o \end{bmatrix} = \begin{bmatrix} I \\ K \end{bmatrix} \pmod{26}$$ $X=\{\{m,o\},\{n,d\}\}$, $Y=\{\{I,K\},\{T,I\} \}$, I w...
This is a weird one... I am looking for a method which I don't even know how to call, nor whether it actually exists! Given a pair of asymmetric keys $s_{k}/P_{k}$ and defining $Sig_{k} \dagger B_{i}$ as the signature of block $B_{i}$ using $s_{k}$. Is there a a function $\otimes$ with the following characteristics? $...
I try to understand Pedersen commitment in elliptic curves over finite fields. I could use some clarification. Let's say we have two generators $G$ and $H$. Is that required that $G$ and $H$ are two different generators of the same group? Pedersen Commitment $C$ will look like that. $$C = aG + bH$$ $C$ is a point o...
In the RSA problem, picking a message $x \in \mathbb{Z}_N \setminus \mathbb{Z}_N^*$ implies factorizing $N$. Since factorization with respect to the standard RSA generator is hard assuming the RSA problem is hard, it is likely that selecting $x \in \mathbb{Z}_N \setminus \mathbb{Z}_N^*$ is hard. Thus, one may ask the q...
Deriving a secp256k1 public key is also possible. For whatever reason, I'm only being provided X and Y, not the public portion. I just need to get the binary representation of the public key given that I am provided X and Y.
Simple question: I just learn the existence of the great Yao's Xor lemma (see a quick sum-up at the end of this post). I'd like to use a similar argument, but instead of a simple function, I've a two rounds (quantum) protocol that outputs a secret $s$ that the adversary may poorly describe. Is there any extension of Ya...
I've read this and this but I'm not understanding why padding a message with a simple random is not secure. For example, consider a 256 bytes modulus. We can agree that the first byte from the message is 0x00, the next $n$ bytes are the message itself and the next $m$ bytes are random bytes. We have that $1+n+m=256$. T...
In this thread Henrick Hellström says that when $ed \equiv 1\ (mod\ \phi(n))$ then $(m^e)^d \equiv m\ (mod\ n)$. So I thought this is how Euler's theorem is related to RSA. But at least I thought that due to Euler's theorem the prerequisite for $(m^e)^d \equiv m\ (mod\ n)$ was $ed \equiv 1\ (mod\ \phi(n))$, until I rea...
Consider a relaxed definition of security. Let $\epsilon < 1$ be a constant and say we only require that for any distribution over $M$ ,any $m \in M $, and any $ c \in C$ $$ |Pr[M=m|C=c] - Pr[M=m]| < \epsilon $$ I want to find a lower bound on the size of key space $K$ relative to $M$ for any encryption scheme that mee...
I understand the typical way to use HKDF is to make one call to HKDF to obtain multiple keys. Is it safe to use HKDF the following way to generate different keys ? If not, why? key0 = HKDF-extract-and-expand(0 salt, Z(DH key exchange), x co-ordinates of public points as info). key1 = HKDF-expand(key0, info1) key2 = H...
There are 3 properties offered by a cryptographic digital signature scheme: Integrity guarantee of the message signed. Authenticity guarantee of the message signed. Non-repudiation of the message by the signer. Property 1 and 2 are also offered by MACs and can be described in one word. The 3rd property is a bit s...
What is the following protocol known as? Is it considered secure? Would it work? Background Alice and Bob each have a secret. They wish to determine if they both know the same secret. If they do share the same secret, they are happy for each other to know this. If they don't share the same secret, they don't want to ...
RFC 8439 states: AES is used there for encrypting the nonce, so as to get a unique (and secret) 128-bit string, but as the paper states, "There is nothing special about AES here. One can replace AES with an arbitrary keyed function from an arbitrary set of nonces to 16-byte strings." If an implementation like SunJCE...
I have a file that include a long string , I can calc the md5 of this file . Is there any way to know which string I need to add for this file so the md5 of this file will be specific md5 that I want? For example , if I have string 111222333444 the md5 of this string is 092d75d9d14011469f281795901bdd1b if I want the m...
So people say to choose $d$ such that $e*d=1(mod((p-1)*(q-1)))$. However, $1\%$ anything always equals $1$. Maybe I am not understanding it correctly, but the only way to get $e \cdot d=1$ is just by doing $e^{-1}$ which leads into a very very small number $\lll 1$ because $e$ is large. How are people getting $e$ and $...