instruction
stringlengths
32
27.2k
Suppose I want to talk with a co-worker about a movie called "The Twist Movie". I know the movie contains an interesting twist, and bringing up the movie in a discussion about twists in movies might spoil the first time experience of someone who has not watched that movie, because now the viewer knows to expect the twi...
I am curious about the advantage or disadvantage in using the different models of homomorphic computation (boolean circuits, modular arithmetic, approximate number arithmetic). Are there any specific properties of these models that make them fundamentally different in certain aspects compared with the others?
I am reading up on Sonic: Zero Knowledge SNARKS from Linear - Sized Universal And Updateable Structured Reference Strings. There is an example of representing $\ x^2 + y^2 = z $ constraint (page 7 of the paper): Can somebody explain how the values for vectors a,b,c,u,v,w,k were obtained?
i have a problem that goes: Suppose you are told that the one time pad encryption of the message "attack at dawn" is 09e1c5f70a65ac519458e7e53f36 (the plain text letters are encoded as 8-bit ASCII and the given ciphertext is written in hex) What would be the OTP Encryption of the message "attack at dusk" under the sam...
Is it better to have statistical zero-knowledge or computational zero- knowledge in a system? If it depends, is there a slightly accurate generalisation that can be made? Maybe one can be somewhat reduced to the other (doubt it)? Maybe one of them solves a larger class of problems?
Machine learning is definitely applicable in analyzing simple shift ciphers like Caesar and affine ciphers, as well as substitution ciphers like Vigenère, but is it possible for machine learning to solve problems involving more complex ciphers such as Hill ciphers, where characters are mixed up and ruin frequency analy...
tl;dr: How do I formulaically determine key rotation schedules for different kinds of keys and use cases? The organization I'm a part of for utilizes both symmetric and public/private key encryption for both external and internal communication. In the past we have essentially done key rotation on an as needed basis, or...
If I'm given a ciphertext, what kind of patterns, index of coincidence, frequency analysis would lead me to guess that it had been encrypted by a combination of Atbasch plus Caesar / Vigenère?
Assume 256 bit keys are randomly generated and data is encrypted using AES-GCM-256 prior to being sent to a server. The goal is to enable the server to determine uniqueness of data it receives without actually revealing the plaintext data. Would it be safe to use SHA-256 where the input to the hash function is the key ...
use pqcrypto_frodo::frodokem1344aes::*; let (pk, sk) = keypair(); let (ss1, ct) = encapsulate(&pk); let ss2 = decapsulate(&ct, &sk); assert!(ss1 == ss2); In the above code, only one keypair is generated. The public key is then used to 'encapsulate', which returns a ciphertext and a shared secret. I'm going to assume ...
I'm looking to create some tokens using a keyed hash mechanism to represent our individual customers. I was planning on using combinations of the customer's personal information (e.g. H(Firstname,Surname,DOB)) in the token to prevent frequency analysis, but is there some way I can quantify this? For example, qualita...
Both RSA and Elgamal have homomorphic properties. So both can re-encrypt the ciphertext. Re-encryption with Elgamal works as seen here. How does re-encryption work using RSA? What modification / addition is needed to transform simple RSA to RSA with re-encryption? The keys for RSA: Public key: $e$ & $n$ Private key: ...
A hash H is given by H = SHA256(K + N), where K is an unknown 64 character hex key and N is a known nonce. The nonce N is then mapped to a final result R between 1 and 10 using R = CEIL(B/25.6), where B is the first byte in the hash H. A list L is populated with the first 100 results R using different values of N for e...
Computational complexity seems to be used quite a lot in cryptographic papers. The time complexity I am referring to is the one from Computational Complexity Theory. Are these two the same things?
By definition $\frac {1} {n}$, $\frac{1}{2^n}$ and $\frac{1}{n!}$ are negligible functions. I have got the function $$f(n) = \frac{1}{(2^n)!}$$ where $n$ is security parameter. I don't understand, How do I formally proof that $$\frac{1}{(2^n)!}$$ is a negligible function? Can anyone please help me out?
I have some questions about the chapter of Birthday Attack in Introduction to Modern Cryptography. When $q=\Theta(2^{l/2})$ the probability of this collision is roughly $1/2$ What's the meaning of $\Theta(.)$ and $\Theta(2^{l/2})$, and why the probability of this collision is roughly 1/2 when the $q=\Theta(2^{l/2})$ ...
Lets say that $u=3, x=5, v=2$, how do we work out $u^{-x}*v$, so $3^{-5} * 2$. I know how to work out the answer if it was $3^5 * 2$ but how do we do it with negative exponents?
I want to compute the inner product of two vectors on a third party, i.e. $f(x) \cdot f(y) = x \cdot y$ where $x$ and $y$ are two vectors. However, I do not want the third party knows the real value of the two vectors. So is there any encryption scheme that can do this?
After looking for ages online for a python implementation of the Vigenere cipher, and finding few, I decided to implement it myself. After ironing out all of the flaws, it's now a working (and secure) implementation of the Vigenere cipher. But I had an idea. What if you increase the size of the alphabet that it's using...
I am making a program using the library cryptopp using curve secp521, in which at the end of that program I get n*Point Because I am writing that program I know that what is the value of 'n'. So, I can verify it. Is there a way in which if some one else, third person when gets that result nP can find out that what numb...
Say we have the following Hash Function, H(x) = 4x mod N where N is a number generated by multiplying two prime numbers and x={0,1,2,3,...,N-1}. So lets assume that N=15 where 15 is made from 3 and 5 How would we prove whether it is collision resistant or not? I tried manually doing it like below: x=0; 4(0) mod 15 = 0 ...
I have a variant on the discrete logarithm problem, involving finding tetration in a multiplicative cyclic group of integers modulo a large prime $p$: $$a = x^x \mod p$$ Where $a$ and $p$ are known, and $p$ is not necessarily a safe prime. Can $x$ efficiently be found or is this at least as hard as the DLP?
In the paper The Conditional Correlation Attack: A Practical Attack on Bluetooth Encryption, an attack against the E0 cipher is described which can break it efficiently in a known-plaintext attack: Our best attack finds the original encryption key for two-level E0 using the first 24 bits of 223.8 frames and with 238 c...
Wanting to write something on Schnorr groups in a publication I realised how hard it is to find anything citable about them on the internet. Who can help me with the following questions? What (and where) is the actual definition of a Schnorr group? Are all of its criteria fulfilled if it is a multiplicative finite cyc...
The Wikipedia article on Discrete Logarithm just states without source: In some cases (e.g. large prime order subgroups of groups ($\mathbb{Z}_p)^×$) there is not only no efficient algorithm known for the worst case, but the average-case complexity can be shown to be about as hard as the worst case using random self-r...
I am aware of attacks whereby an attacker is able to forge a message IF the hash of the original message is the same hash as their current message. The question is, is it still possible for RSA-FDH to be EUF-CMA IF the hash function in question is collision-resistant. Lets take the case of $H(x) = 3x \mod N$. 3 is a pr...
From Wikipedia: Error propagation It was common to discuss the "error propagation" properties as a selection criterion for a mode of operation. It might be observed, for example, that a one-block error in the transmitted ciphertext would result in a one-block error in the reconstructed plaintext for ECB mode encryptio...
I have the following draft to keep my data secure in transit. Generate 2048 bit RSA key sha256sum that private key and use that sum as aad, key and iv parameters in the following aes encryption function 12 int aes_encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *aad, 13 int aad_le...
When using AES in GCM mode, the GHASH function uses E(0^128) as the initial value for H, the authentication key. The IV, for the underlaying CTR mode, is initialized with: [prefix (application nonce)] [initial_counter (4 byte counter)] This initial counter starts at ...02, like explained here. I'm guessing this is done...
I need to create cryptographically secure pseudorandomness in JavaScript. However, when I googled for PRGs, all I found was very sketchy. My idea is as follows (in pseudocode): seed = "0x1a29fd..." // long number I always get passed (impossible to guess but used in a different context as well) hashedAndSaltedSeed = sha...
Are there any known ciphers that whose ciphertext (given any plaintext) avoids bigrams of the form "aa, bb, cc, etc."? What about known ciphers that make bigrams of form "aa, bb, cc, etc." rare compared to other bigrams? I understand that it is easy to construct a cipher that does this, but I am wondering if there are ...
I have a chat server which uses public keys to identify their clients. But if the public key is known, then everyone can send a direct message (DM) to each other, which is annoying. The clients should choose who should DM them. So I decided to get two hashes of the public key, one for user authentication and one for id...
I'm working on a distributed application, and we need a way to authorize clients. Every client has a PGP keypair associated with them, and we require them to enter their private key (which is not stored) through which their pubkey is derived and used to identify clients and modify their fields on the distributed databa...
I cannot understand how this works. $\text{A}_\text{public} = g^a \bmod p$ $\text{B}_\text{private} = \text{B}$ $\text{g} = p$ I also have $p$, I need to get the shared key, that I know both $\text{A}$ and $\text{B}$ get exactly the same value. Im not understanding how can I get the shared key that $\text{B}$ generate...
The traditional brute force collision attack is generate $2^{N/2}$ (unique) random strings, hash them and this results in ~50% chance for collision. The attack talked in the question's title is generate hashes by the sequence $H_0 = F(S), H_n = F(S||H_{n-1})$, where $S$ is a string to make collision with, $F$ is the ha...
We have the following settings in our system: TLS 1.2 using legacy cipher suite - OFB mode (using 64 bit block cipher) and trunkated CBC-MAC (32 bit). The goal is to achieve authenticated encryption for some message $D$. The problem here is definitely the MAC length. But we cannot change neither the algorithm, nor ta...
All LFSR-based stream ciphers that I know of use a fixed feedback polynomial (i.e. the taps are always in the same position). I know that, at least for non-trivial output lengths, it is necessary to ensure that the polynomial is primitive to avoid creating an LFSR with a short cycle. Are there any published stream ciph...
Is there a point in using LHE over SHE? From what I understand, SHE is like an extended version of LHE, the only difference is that you limit the depth of circuits that can be evaluated. Therefore, I wonder which is better to use since they seem to be the same. What is the effect of limiting the depth of the circuits? ...
In Fully Homomorphic Encryption, where does the bootstrapping procedure performed, in the client-side or the server-side? Also, which side holds the secret key and the public key?
I was studying WPA2 and it's security when I came across this problem. I know that WPA2 uses PBKDF2 to generate a Pairwise Master Key. It does something like this; DK = PBKDF2(prf=HMAC-SHA1, key=password, salt=ssid, DkLen=64, iterations=4096). I get that. But what I don't is the PRF module itself. HMAC itself is h(k +...
Charlie knows both Alice and Bob. Alice wants to send a message to Bob. Charlie must at all times know that Alice is sending Bob a message but must never know the content of the message. The message can go from Alice to Bob direct or via Charlie. But at no time should Charlie know the content of the message. The solut...
I am learning the meet-in-the-middle on DES attack. I understood the basic logic behind how it is performed; however, one further question is: why can we guarantee to find one and only one pair of k1 and k2? One step further, how DES guarantee that by taking the same plaintext and different secret key, the encrypted ou...
If I double encrypted a text with for example AES wouldn't it be invulnerable to bruteforce attacks due to the computer not knowing when it has reached the plain text? Plain text->1st layer of encryption->2nd layer->output
The Salsa20 core function takes a 128-bit constant, 256-bit key, 64-bit counter, and 64-bit nonce and produces a 512-bit value. Or more generically, it is a mapping from 512-bit values to 512-bit values. Is there a reason specific input bits were chosen for specific purposes? For example, if the some of the counter b...
Following article explains a simplified version of Erasure Coding: Link to the article here is the recipe: Take a file of size M. Split the file into k chunks, each of the same size M/k. Now, apply the (n, k) code on these k chunks to get n chunks, each of the same size M/k. Now the effective size is nM/k. Thus the f...
I stumbled upon an encrypted text on a website, to which Google had brought me, showing me the plain text also. So does anyone know what kind of encryption was used here and how to decrypt it, so I can decrypt the rest of the text? Encrypted text: Deälldllod Lokl Koih, dg emlll ld kmd Llshlloosdelädhkhoa Lühhoslo ha M...
In the bottom of the wikipedia article of LWE (https://en.wikipedia.org/wiki/Learning_with_errors), we can see construction of Public-key cryptosystem based on the LWE. But, I cannot understand whole thing geometrically. From a $n$-dimensional vector space (modulo q), we sample a random vector $\mathbf{s} \in \mathbb{Z...
Let's say you're building RNG with ChaCha20 and the fast key erasure technique. There seem to be a few ways to do it. The reference implementation in the SUPERCOP benchmarking toolkit looks like this: #define KEYBYTES 32 #define OUTPUTBYTES 736 int crypto_rng_chacha20( unsigned char *r, /* random output */ ...
the fast implementation of present cipher for 8-bit register uses four 8-bit lookups tables for permutation. Table 3 & 2 are : static const uint8_t sbox_pmt_3[256] = { 0xF0, 0xB1, 0xB4, 0xE5, 0xE1, 0xA0, 0xE4, 0xF1, 0xA5, 0xF4, 0xF5, 0xE0, 0xB0, 0xB5, 0xA1, 0xA4, 0x72, 0x33, 0x36, 0x67, 0x63, 0x22, 0x66, 0x73...
I am trying to determine how much entropy is going into a specific CSPRNG in JavaScript, but I can't seem to find a pure-JS client-side implementation of an entropy estimator. So, I need to find a way to estimate entropy locally with pure JavaScript. If it helps, the entropy is in an array which should be easy to mani...
I am looking for a python library for encrypting a string with a single key. I do not want the key to derivable by knowing the input and the output. I have came to cryptography.fernet so far, but I am not sure if this will fulfill my needs. Can the encryption key be derived by knowing the algorithm (assuming the fernet...
I am reading the "W-OTS⁺ – Shorter Signatures for Hash-Based Signature Schemes," by Andreas Hülsing, and I am stuck in understanding the success probability of an adversary, $\mathcal A$, against the one-wayness function of, $\mathcal F_n$; equation #1, page 7, \begin{align} \operatorname{Succ}^{\operatorname{ow}}_{\...
I'm working through Pairings for Beginners by Craig Costello, and am trying to understand the preamble to the Tate pairing. (See p. 70 ff., section 5.2 of of the PDF.). I'm having trouble following a few arguments and would really like some help please. The setting is curves of embedding degree $k > 1$, $r∥\#E(F_q)$ (w...
I recently noticed a .NET software using PBKDF to derive an encryption key from a password string. This password string was dynamically generated using System.Random. Now, I know that System.Random is not really cryptographically random and should not be used for security purposes. Moreover, there are several flaws in ...
PKZIP encryption has been around since 1990, and its decryption is directly supported in most desktop environments (Windows, MacOS, most Linux distros). This makes it one of very few options when recipients are not allowed to run any unknown program (as often enforced by an IT department), and the most likely to allow ...
Background I do not recommend trying to roll your own crypto. This is just a for-fun PoC, which won't be used in any public or private scenario. I am creating a PoC nearly-true random number generator, but this won't be used in real applications. I know the rule of "Don't roll your own crypto", but this is just a fun P...
Consider a single round of a cryptographic permutation, what is so special about it that lacking some bits of information that either get mixed into it as a subkey or omitted at the end (sponge construction) makes you unable to revert it efficiently once it gets looped in sufficient number? The best analogy I could com...
I do not know how the Key Length extension attack works. So if we leave that aside for once, and say just about usual brute-force attack on the hash, I don't really know how is PBKDF2 so much better than usual hashing. Mathematically I know that PBKDF2 is so better against rainbow table attacks and also slow to recrea...
Sorry if I don't express myself well in English. The solutions $h$ and $k$ of $$[(h+1)^2]*[(2*h+2)^2/2-1]=X* M$$ and $$[(k+1)^2]*[(2*k+2)^2/2-1]=Y*M$$ are such that each $M$ number divisible by $9$ has these characteristics: $$(h+1)/3=(k+1)/6$$ and $$k+h+2=M$$ and $M$ is a divisor of a sum of odd consecutive cubes fr...
For SHAKE128 hash function in SHA3VS document, I find this paragraph: Therefore, for testing SHAKE128, (168*2)+1) = 337 unpredictable messages will be generated with lengths from 0 to 337 336 bytes (omitting 0 if zero length is not supported) and SHAKE256, (136*2)+1) = 273 unpredictable messages will be generate...
This question is a little more implementation based. I am writing my masters thesis on differential cryptanalysis and I wrote a program to evaluate some things about differential cryptanalysis. I implemented the attack for different cipher and to give you some more details, in this question we talk about a cipher which...
I am curious If every single digital file has a hash and/or a checksum. When verifying my downloaded files using hdiutil on mac os, about 90% of my files report some sort of checksum. However, when i download .iso files or ubuntu / windows, img’s or iso’s, i’ve noticed many of my image files do not report a checksum. ...
I try to estimate the energy consumption by a sensor node when executing an authentication algorithm witch contains operations (hashing, XOR, Encryption / decryption by public/private key, addition,...). The algorithm is named MDA (Message Digest Based Authentication). It contains: (SN:sensor node; CH: cluster head; T...
In terms of period length, uniformity/distribution, what is the most secure/reliable CSPRNG currently available?
Say I want to seed a CSPRNG. What sources are popular, but unreliable? What sources should I even use?
I am going to store secrets from users. The secrets need to be stored confidentially. For this question, I am concerned only with confidentiality (not integrity). Here is how my encryption scheme is: We start with a 20-character randomly generated alphanumeric password. A new 128-bit salt is generated randomly for eac...
Usually a Pseudo Random Generator is supposed to be IND-CPA secure. But apparently, it is not in some cases such as the following: A PseudoRandom Generator $G$ has expansion factor $n + 2$. Encrypt $m \space \in \{0,1\} ^ {n+2}$ Choose a random value $v \leftarrow \{0,1\}^n$ Then send $(v, G(v) \oplus m)$ The questi...
I'm working on a blockchain-based distributed application which stores Client information. I'm thinking of alternate ways to authenticate Clients on the network. One idea I got was to associate a Username and Password with the Client data structure -- where Password is a Hash(salt+password) where salt is securely store...
I want to know a proof for why the dlog problem is hard in the generic group model. But i can't find any resources online. Can someone please provide me a link or an explanation?
I want to try run an example of Paillier cryptosystem(Algorithm), So i just started with some basic examples, but cannot obtain correct result/decryption. I just change random factor r from 97 to 101 in Reliable Implementation of Paillier Cryptosystem, and return with wrong result. is there any relation between the r...
In an implementation of AEAD_AES_128_GCM, if the AAD is defined as a "zero-length octet sequence", is it necessary to call the encryption code that adds an AAD at all? In particular, does an OpenSSL/LibreSSL libcrypto client need the EVP_En/DecryptUpdate invocation that adds the AAD, if its length is 0? I'm working on ...
Why do we use or have Boolean Circuit Model is it because since it uses gates and bits we could adapt it into a hardware model?
I have seen the terms multiplicative depth and multiplicative level while reading Faster homomorphic encryption is not enough: improved heuristic for multiplicative depth minimization of Boolean circuits by Aubry et. al, 2019. Is there a difference between the term multiplicative depth and multiplicative level?
I was wondering if the mere existence of a (by some definition) secure cryptographic hash function immediately implies an equally secure symmetric encryption scheme. By my understanding, one could to the following given such a function: Encryption: Using a shared secret key, we calculate the hash of the key concatenate...
I'm trying to find an efficient algorithm to calculate the $y$ coordinate of a an elliptic curve point given its $x$ coordinate, for elliptic curves over fields of the form $2^m$ with polynomial representation of the field elements. I had the exact same problem with elliptic curves over prime fields, but it is very sim...
From the Salsa20 security document, DJB states that he doesn't care about related key attacks: The standard solutions to all the standard cryptographic problems—encryption, authentication, etc.—are protocols that do not allow related-key attacks on the underlying primitives. I see no evidence that we can save time by ...
Suppose you have a cryptographic permutation consisting of identical rounds, that makes it vulnerable to a slide attack. But if you sandwich it between two XORs of key material. Is it still vulnerable? Even-Mansour block cipher construction works on such a principle although it says nothing about a permutation with ide...
The original definition of $\epsilon-$differential privacy is for two databases $D_1$, $D_2$ that differ at most one entry and an randomized algorithm $A$. We have a bound on the probability ratio $\frac{Pr[A(D_1) \in S]}{Pr[A(D_2) \in S]} \leq e^\epsilon$ where $S$ is subset of range of $A$. How do we define such thin...
I want to use the Paillier cryptosystem for encryption and decryption purposes in my research work. But i haven't found a way to encrypt big input messages; As i want to encrypt the message i,e m : m = 0xa56f89d6aa234776b22347293429ff074928ab3749cc2837c492b874ebfaba78364ba0912efe862f628347982478b Key Gen: p =887, q = ...
I'm playing with cryptography and its use with typescript on one side and PHP on the other side. Now I'm looking for routines that can encrypt and decrypt with ecdh's private and shared keys. Any recommendations? At the moment its in a testenvironment to figure out how it works basically. The keys (private and shared) ...
As Pailliear cryptosystem secret key $\lambda$, depends on primes $p$ and $q$. As $\lambda = \operatorname{lcm}(p-1,q-1)$. I want decryption key to independent from $p$ and $q$. It can be possible to generate decryption key independently?
I've been reading up on the Ring Learning with Errors problem and the proposed attacks, in relation to homomorphic encryption. Some of the literature has been quite difficult to understand - what I want to know is if it is possible to solve this problem? And if so, what is a general outline of a possible attack? I'm qu...
Given two distinct safe primes $p_1 = 2 \cdot q_1 + 1$, $p_2 = 2 \cdot q_2 +1$, consider the following two instances of the discrete logarithm problem with the same unknown exponent $x$. $$ g_1^x \equiv y_1 \mod p_1 $$ $$ g_2^x \equiv y_2 \mod p_2 $$ where the multiplicative orders of $g_1, g_2$ are $q_1, q_2$ respecti...
This is a purely theoretical question. I've found some similar questions, but they're not what I'm asking. Most importantly, I'm not asking whether anyone can find the hypothetical duplicate. I'm not asking about the probability of encountering a collision, or how long it would take. In short, for my purposes, pretend ...
I'm new to ECDSA and there is something I still not sure about. If I have a classic Certificate Authority server that delivers PEM certificates containing public key with ECDSA, I can retrieve the coordinates of the Point on the curve, and the curve used. My question, is regarding the coordinates of the point $x,y.$ Is...
In Chapter 21.3 of Schneier, Applied Cryptography I read the following about the Schnorr Authentication Protocol: To generate a key pair, first choose two primes, $p$ and $q$, such that $q$ is a prime factor of $p - 1$. Then, choose an $a$ not equal to $1$, such that $a^q \equiv 1 \pmod{p}$. Then choose a random numbe...
In "The Algorithmic Foundations of Differential Privacy" book, Advanced Decomposition Theorem (Thm 3.20) is stated as follows: For all "$\epsilon, \delta, \delta' \geq 0$, the class of ($\epsilon,\delta$)-differentially private mechanisms satisfies ($\epsilon',k\delta+\delta'$)-differential privacy under $k$-fold adap...
Suppose that I have a password in plaintext. I also have the hashed version of the password. Say it uses MD5. Is it possible to find out what the salt is given the above information? I'm guessing not?
$A(x) \bmod B(x) = C(x)$ and $A(x) \bmod D(x) = E(x)$: A dealer knows $A(x)$ polynomial, which is a secret. He distributes $C(x)$ and $E(x)$ privately to $X$ and $Y$, respectively. $B(x)$ and $D(x)$ are public. $X$ and $Y$ want to know that $C(x)$ and $E(x)$ is the result of $A(x) \bmod B(x)$ and $A(x) \bmod D(x)$, res...
ElGamal, RSA, and Paillier cryptosystem have homomorphic property, and can be used fro re-encryption purposes. I want to use the encryption to re-encrypt ciphertext(as in proxy re-encryption but differently/different scenario / may be like universal re-encryption) Requirements: Encryption: Encryption: choose some ran...
Assume two devices (A and B) with self-signed TLS certificates (this part can't change). We want these devices to trust each other. One way to do this is to simply copy A's cert over to B's allowed cert list and vice versa, but this is a little cumbersome usability-wise. Instead, what about this scheme: Device A gener...
I want public key cryptosystem to used for re-encryption as describe in Can Paillier ,RSA or any other schemes be used for universal re-encryption like elGamal? Now i have little solution for Paillier cryptosystem, to choose key that is dependent on environmental variable. i,e IP-Address . The problem is how to map t...
I was playing around with modular arithmetic when I noticed something. \begin{align} g^k &= a \bmod n\\ g^{k+0.5(n-1)} &= b \bmod n \end{align} Then $a + b = n$, so you can also write $$g^{k+0.5(n-1)} = n - a \bmod n$$ This seems to hold if $n$ is prime and $g$ is the primitive element of $n$, according to randomly tr...
In X25519 (ECDH over Curve25519) Peer A and B exchange their Public Keys PkA and PkB and then calculate a shared-secret SecAB using cominationOf(SkA, PkB) == combinationOf(SkB, PkA). For forward secrecy, I think it's recommended for A and B to re-negotiate a new shared-secret regularly (thus advertise new Public Keys)....
The basic idea of homomorphic MACs is that a user can use a secret key to generate a set of tags $σ_1 \dots σ_n$ authenticating values $D_1 \dots D_n$ respectively. so, anyone can homomorphically execute a program $P$ over $(σ_1 \dots σ_n)$ to generate a short tag σ that authenticates $m$ as the output of $P(m_1 \dots ...
As most know, a duplicate nonce with GMAC/GCM allows key recovery attacks against GMAC itself and thus the ability to forge messages. This is because GMAC computes GHASH and then just XORs this with AES(j) where j is the GCM counter. If a nonce is duplicate you get identical AES(j) which lets you XOR and get the raw GH...
Here is my question when learning Vigenère cipher, can we perform frequency analysis attack toward this cipher? My first impression is no, because each column of its matrix has exactly 26 English letters. But I also know that this cipher is not secure. So, my question is, whether and how we can perform frequency attac...
I am learning ECC, I am confused a bit how it works for now. To my understanding, G is the starting point, k is how many times you apply the dot operation. And Q is the public key, which is the final point after you apply k times dot operations, like this Q = kG And then Q is the public key, and k is the private key. ...
What is the size of key material required for generating MAC keys, encryption keys and IV when use TLS_DHE_RSA_WITH_AES_256_CBC_SHA ? How to calculate it?
Up to now, the pairs of strings that create an MD5 collision that have been discovered all contain non-ASCII (binary) characters. Are there two known ASCII-only strings which have the same MD5 hash value? For instance the set of characters [0-9A-Za-z]?