instruction
stringlengths
32
27.2k
A high-level overview of AES is according to Wikipedia Key expansion; Initial round key addition; 9, 11, or 13 rounds; Final round (making 10, 12, or 14 rounds in total). I can understand all the steps except step 2 which is known as key widening. What is the importance of the key widening step? How does it contribut...
Using T-SQL as per the snippets below, which method is superior (or is it a tie)? -- method 1: DIY SET @Salt = '' WHILE LEN(@Salt) < 72 BEGIN SET @Salt = @Salt + CHAR(CONVERT(INT, Floor(RAND() * (126.0 - 33 + 1) + 33))) END -- method 2: concatenating 2 GUIDs SET @Salt = CONVERT(VARCHAR(36), NEWID()) + CONV...
I am trying to understand the use of pre-computed points in ECC for ECC signature, verification, key generation, and so on. After searching on the internet, I understand that pre-computed points aid faster execution. However, I am unable to get the complete picture. Can someone help with an example? Also, once the pre-...
Consider the following question: Given a $n$-bit cryptographic hash function $H$, how many messages should we expect to hash before before finding a message $x$ such that $H(x) < 2^{n-k}$, for some integer $k$. For me, this question does not make a lot of sense. A cryptographic hashing function has always a fixed size...
Imagine a situation where a prover can only sign with BLS signature signing algorithm, a verifier can only verify with Schnorr signature verification algorithm. Is it possible to convert a BLS signature to a Schnorr signature, so that a verifier who can only verify Schnorr signatures can verify derived signature given ...
I am designing a protocol that 2 devices will use to mutually authenticate over an unreliable, unsecure channel. The system must be fast and low-power, so symmetric cryptography is a requirement. I was thinking of using a challenge-response protocol, but cannot find existing ones that offer mutual authentication and us...
I'm trying to solve the following exercise: Let $G_1, G_2: \{0,1\}^\lambda \to \{0,1\}^{\lambda + l}$ be two deterministic functions mapping $\lambda$ bits into $\lambda + l$ bits (for $l \ge 1$). You know that at least one of $G_1, G_2$ is a secure PRG, but you don't know which one. Show how to design a secure PRG $G^...
First, we observe that the expression X*Y mod P (where X and Y are secret and P is a large public prime) reveals no useful information. Next we define an extending function E(U, M) which "somehow" transforms U in such a way to guarantee that the result consists of at least M bits. For example, by returning the bit patt...
I have recently been very interested in elliptic curves because they are a powerful tool in crypto, ECC, pairing, etc. However, it seems that elliptic curves are not popular in homomorphic encryption. I understand that lattice-based crypto is currently the only way to construct FHE, like LWE. Elliptic curves can only b...
I have 1 block of encrypted data with AES-128, but I know 104 bits of 128 bits the key. How long it will take to brute force 24 bits of a key at Intel I 7 CPU? How can I calculate that?
For the sake of curiosity and fun, i have implemented a C# program that operate as deck dealer on 40 cards deck (following the Fisher Yates shuffeling algorithm https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle). The fun part is that i have used the "faulted" rng that the language provide (small seed compared ...
I came across an IC device configuration & security flow and the details are illustrated in image below. I'm wondering must the ECDSA pair with the SHA Hashing function? Alternatively, what if using the AES-GCM to generate both CIPHER & TAG? The GF generated TAG later go through the ECDSA to be encrypted with the priva...
I bought an HWRND last week. What do you think, how secure is the encryption with that and the OTP? See the OneRNG theory of operation here.
In school we only learned the formula without the normalizing coefficient: But Wikipedia has one that says: I am using IC in a cryptography class to find the key length and am checking various key lengths to see which one results in an IC closest to 0.066. I have to automate the key length finding process but I don't...
I am learning about the BGW Protocol and I understand that for a MUL gate, you need to follow the degree reduction protocol. I am wondering if it is possible to implement a single input and single output "SQUARE" gate that computes the square of the input? I imagine some sort of degree reduction protocol would be invol...
According to walkthrough steps for ECDSA topic from wikipedia as shown below, What if the impact if we don't apply the hashing function (highlighted in blue in the image) to the raw messages? Although this sounds a bit silly, but let's say we have both with or without SHA256 engine test cases like below. Hex Message (2...
I am just beginning to read into pseudorandom generators and I came across this definition for a PRG: $G_n : \{0,1\}^n \rightarrow \{0,1\}^{l(n)}, \quad \text{ where $l(n)$ is a polynomial}$ Is there a reason why $l(n)$ has to be polynomial? Wouldn't there be an even better security guarantee if it was an exponential f...
Assume that $F: \{0,1 \}^n \rightarrow \{0,1 \}^n$ is PRF. Examine if the following functions are PRFs: $$ \begin{align} 1. \, F_1(k,x) &= F(k,x) \oplus x \\ 2. \, F_2(k,x) &= F\left(F(k,0^n), x\right) \\ 3. \, F_3(k,x) &= F\left(F(k,0^n), x\right)|| F(k,x) \end{align} $$ where $||$ denotes concatenation. Attempt: For...
In Saber: Module-LWR based key exchange, the authors use a rounding function called $\textit{bits}$, defined (in page 3) as follows: $bits(x, i, j)$, with $j \leq i$, gives $j$ consecutive bits of a positive integer $x$ ending at the $i$-th index (assuming the least significant bit in the $0$-th index), producing an in...
Is there any known differential-linear attack on full round DES? I couldn't found any and couldn't work on this due to time restriction.
Let ssuppose that we are using AES in CTR mode to encrypt a number of blocks ($x$ bytes each). How is the current used IV (nonce+ctr) synchronized among both communicating entities? I suppose that the Nonce can be exchanged in advanced in plaintext. The ctr value can then be appended to each cipher as plaintext. In tha...
I'm trying to unhide information in a .bmp image using the tools on https://incoherency.co.uk/image-steganography/#unhide However all I can see when using the tools are at best a black image with a few colored squares at the bottom and at worst a slightly blurry version of the image I'm using. I've tried to use other t...
I don't get why SHA-256/SHA-512 hasn't been broken, at least for shortish (10-12 character) passwords It is perfectly plausible to pre-compute a password/hash-pair table using numerous very fast computers (thereby significantly increasing the speed at which this is done). Clearly I am misunderstanding, so I would appre...
Given a set of numbers within the range of 1-6: [3,4,3,4,5,6,2,3,1,5,2,3,6,2,2,3,3,6,6,4,5,2,5,3,5,2,4,4,2,6,3,6,1,5,1,3,6,1,1,2,2,4,5,3,1,2,3,4,4,6] generated using Java's nextInt(6)+1, is it possible to reverse engineer this to find the seed? Upon investigating Java's source-code I understand this is how the nextInt(...
Rijndael Block Cipher supports multiple block/ key lengths and a subset of these was selected as AES. What other cryptographic primitives are derived from Rijndael or make use of its round function/ design principle (e.g LED Block Cipher, Lex Stream Cipher)? Are there any other possible variants of Rijndael/ AES that h...
https://en.wikipedia.org/wiki/Disk_encryption_theory#Xor%E2%80%93encrypt%E2%80%93xor_(XEX) reads: The standard supports using a different key for the IV encryption than for the block encryption; this is contrary to the intent of XEX and seems to be rooted in a misinterpretation of the original XEX paper, but does not ...
The private key is any random 256 bit (but smaller than prime p) number or must be prime or other condition? For selected $x$ can be found $y$ - decompressing key: #! /usr/bin/env python3 import binascii import math p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F def decompress_pubkey(pk): x ...
I have a project where a user needs to store a U32 encrypted on a blockchain such that they can recover it themselves: the user will always have their key available but may "forget" the U32 value. No other party needs to decode the information, but the plaintext will eventually also be public on the chain. The user has...
When it's considered, like here a project where a user needs to store a (small piece of data) on a blockchain what does that really mean from a cryptographer's perspective? What security guarantees does it give? Things like availability (to which entity, under what condition and delay, with selection according to wha...
So basically i have a set of float data, its value ranges from -1.3117 to 1.7956 and then i convert this data into 64 bit binary value(assuming it is originally 64 bit double float). After that, i convert it into 64 bit integer. I encrypt this data with an encryption algorithm. The cipher histogram shows the distributi...
I'm an electrical engineering student and was doing a brief research regarding the round transformations of the AES-128 and came across the Wikipedia article describing the generation of the substitution box (https://en.wikipedia.org/wiki/Rijndael_S-box) from the mathematical point of view. In the corresponding article...
For 256 bits "Double-and-add" multiplication uses about 128 addings and 256 doublings, where "Montgomery ladder" uses near 256 addings and 256 doublings. "Double-and-add" in my Intel(R) Core(TM) i3-8130U CPU @ 2.20GHz takes 0.02 s, it is normal or too big? In adding we compute $\lambda = \frac{y_q - y_p}{x_q - x_p}$. M...
Linked question: AES encrypting multiple files With a password, I have 100k files to encrypt. (Maybe 100k files today; or maybe 50k today, 10k tomorrow, and 40k files the next week). Up to now, I did this (pseudo-code): for each file: plaintext = file.read() nonce = getrandom(bytes=16) key = KDF_PBKDF2(pa...
I have the polynomial ring $R = \mathbb{Z}[X]/(X^N - 1)$ with $N = 11$ and $h \in R$ with \begin{equation*} h = 7 -11X - 7X^2 -12X^3 + 8X^4 - 11X^5 + -8X^6 + 11X^7 - 4X^8 + 2X^9 + 3X^{10} \end{equation*} Now I want to find the polynomial $u$ such that \begin{equation*} u\cdot h + v\cdot (X^N - 1) \equiv X - 1 \ (\textr...
Can anyone give me some documentation on the various format preserving encryption modes?
My question is rather practical and specific. I am trying to setup an efficient CKKS scheme in Palisade. To this end, the automatic choice for secure parameters has to be turned off and I rely on the LWE estimator which estimates the security of an LWE instance. Now, the estimator provides a security estimation for an ...
This paper introduces 'Freestyle' a randomized, and variable round version of the ChaCha cipher. It uses the concept of hash based halting condition, where a decryption attempt with an incorrect key is likely to take longer time to halt. It works on the following principle: a sender encrypts a block of message using a...
For curve secp256k1 prime modulus is $2^{256}-2^{32}-977$ and order is smaller number but has near half of starting bits set. If I draw number to be private key, it must be less than order. All field operations are modulo prime modulus and it means they must be smaller than modulus but can be >= order? (or not?). Coor...
While I am a front-end developer and not a security expert programmer, I am worry about the keys I am using for my AES && RSA encryption. Please help me to understand: Is the following keys are secure ? Is the following keys are performant and fast ? I don't have any IV, is it good still without it ? If IV is good and...
Distance-bounding algorithms are a classical solution for the Relay Attack, wherein a verifier can determine an upper bound on its distance from the prover. However, recent literature is discussing the concept of mutual distance-bounding, where both sides of a transaction can measure this upper bound, to overcome the r...
I was just wondering why this kind of algorithm can't be used instead of, say, Diffie-Hellman to exchange keys: Alice decides on a key she wishes to share with Bob. Alice generates a stream of bytes with the same length as the key (securely, say, with a CSPRNG). Alice sends to Bob: C1 = (key ^ alice_random_bytes) Bo...
Please pardon my question if it seems silly, but I am very keen on knowing: in applied cryptography, there is such a thing as a one-way function, which given an input would generate an output that is unique for that input. Discrete logarithms and factorials are, as far as my knowledge goes, necessary to create one-way ...
Are there any problems for which we have known lower bounds? For example, for comparison based sorting, we know you need $\Omega(n \log n)$ comparisons. Edit: I'm aware that this requires restricting the algorithm to comparisons. I couldn't think of any lower bound in an unrestricted model, but I'm mostly interested in...
The definition of a function $F:\ \{0,1\}^n\times\{0,1\}^n\to\{0,1\}^n$ being a Pseudo Random Function Family (PRF) is that it's implementable by a P.P.T. algorithm $\mathcal F$, and there is no P.P.T. algorithm $\mathcal A$ able to distinguish $x\mapsto F(k,x)$ from a random function for unknown random $k$ and non-van...
For the elliptic curve with equation $y^2 = x^3 + x + 0 \pmod{13}$ in the finite field, how are all the points in this curve calculated. See the image below for an example created via https://graui.de/code/elliptic2/. The above images shows 20 points. How are the coordinates of these points calculated?
Suppose a bunch of software entities are participating in a wide-area broadcast network (the network carries a lot of traffic, and the software entities also participate in those conversations, so their transmissions are likely to be seen by friend and foe alike). How can they find each other efficiently and establish...
I understand that the ring setting of an Enigma rotor changes the alignment between the internal wiring and the letters on the ring. For example, in the diagram below, rotor I has ring setting 2 (B), which causes current entering at position A (the center) to flow through the wiring from Z to J (internal positions) whi...
I am creating a Binary Neural Network that encrypts payloads and I would like to compare it to AES in quality, for example: With BNN you would need XX years to decrypt where with AES would take YY years. How can I do that?? Currently, I have two tests: A graphic representation that shows how random the payload is, lik...
These are hash functions, but I don't understand their notations, can anyone tell me what's the difference between H, H1 and H2? $\mathbb{G}_1$ is an additive group and $\mathbb{G}_2$ is a multiplicative group. Both groups have the same prime order p and their bilinear mapping is $e: \mathbb{G}_1 \times \mathbb{G}_1 \t...
We need find y for some x on elliptical curve in cases: decompressing public key restoring public key from signature for given message hash, r and s. This algorithm uses power twice: first it is y1 = $x^3$ modulo p, and next is very high degree y = $y1^{(p + 1) / 4}$ modulo p. I know way to compute it on logarithmic ...
For the elliptic curve y^2 = x^3+2x+2 mod(23), why is it necessary that 23 is a prime. Why is the elliptic curve y^2 = x^3+2x+2 mod(24) not suitable for elliptic curve cryptography?
As described in RFC 8017, RSASSA-PKCS1-V1_5 uses the following bytes during the encoding process : 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x04, 0x20 Does anybody know how to compute these values?
I am trying to finish a paper on censorship resistant data-sharing systems in semi-centralized ways. I know the below threat model can be mitigated by using decentralized system, but I am looking for a possible theoretic solution for the following, without being able to change the rules. Consider the following threat m...
I read here that assuming we have a Fiat-Shamir (FS) signature $\Sigma$ that is secure based on the hardness of a particular hard problem $\Pi$. Then, the security proof of $\Sigma$ in the classical ROM indicates that the reduction algorithm can break the underlying problem $\Pi$ with advantage $Q^{-1} \cdot \epsilon^2...
We have two bit strings $x\in\{0,1\}^q$ , $y\in\{0,1\}^w$ of length $q$ bits, and $w$ bits. The notation $x\mathbin\|y$ means $(q+w)$ bits long concatenation, And the functions: $H∶\ \{0,1\}^* \to \{0,1\}^n$ and $F∶\ \{0,1\}^* \to \{0,1\}^{n+6}$ defined in terms of $H$ as $$F(x) = 000\mathbin\|H(1\mathbin\|x)\mathbin...
I recently implemented an algorithm written in Python that was using the XTEA encryption method. Are there any more reliable algorithms than the XTEA , regarding to memory usage and PSNR ratio ,other than integrity, which do not encounter drastic degradation of image and fulfill the requirements of a imperceptibility ...
In my understanding, RSA-sig authentication only requires its own Public Key so that the peer authenticates it using Root CA's public key. But, strongSwan VPN configuration requires its own private key. I can't understand it. Am I wrong about RSA-Sig authentication or is strongSwan using RSA encryption?
I use for tests small toy 16-bit elliptic curve: Modulus prime p: 65167 a: 0 b: 7 order: 64879 G: (62171,14828) (generated by brichard19/ecdl on Github) I use procedures: bool Ecdsa16::sign_simple(const uint16_t privateKey, const uint16_t msgHash, const uint16_t nonce, uint16_t &outR, uint16_t &outS...
I want to develop a system where before some activity is performed, the user is sent a hash of a sequence of values which will be an inputs to the activity. The number of possible values is fixed and values are not repeated in the sequence. This I can do: After the activity, the actual full sequence is sent to the user...
To achieve double insurance for authentication, can we sign the GCM final tag with using RSA? with RSA, no one is able to create his own tag since the private key is not known. However, according to FIPS.186-4, it looks like the input to RSA must be compliant to NIST approved hashing function. Possible for this GCM + R...
I'm wondering what is the current knowledge regarding the difficulty of solving the Diffie-Hellman problem (DHP). Obvisously solving the DLP (discrete log) is at least as hard as solving the DH problem. What about the converse : In a general setting (cyclic group, no other assumption) ? With specific groups (multiplic...
A man encrypted a hard drive in 1996 using three key 3-DES with a 64 bit IV and CBC mode in the following manner using known 1990s algorithms on a 1996 PC. Here is how he did it. Start with a randomly generated 256 character (full 0-255 range on each character) key generator. Randomly generate a 64 bit IV in a separa...
I can recover something trivial like a 16-bit AES key in practice. I'm confident that a 64-bit AES key can be recovered. However, I have been unable to find any documentation of the biggest AES key that anyone claims to have recovered in practice. Are such competitions held, and is there a recognized progress meter tha...
In a threshold encryption scheme, a dealer generates $(PK,SK1,…,SKn)$ and distributes the secret keys to users indexed by $1,…,n$, and if a combiner obtains $t+1$ partially-decrypted ciphertexts, it can retrieve a plaintext. When only for one message $M$, we can first use public key $PK$ to encrypt $m$ and get $C$, the...
So given you can find a collision for any MAC value, would this be viable without knowing the key. Even if you couldn't figure out how that MAC function works, could you find valid MAC values for a message without needing to know how it works. If so how would you go about doing this.
Consider AES-256, 128-bit blocks, and PKCS#5 Padding. During a Padding Oracle Attack, a manipulated byte of cipher text is sent to the oracle and we eventually hope to find out what that respective byte of plaintext was. If I know the set of possible characters in the plaintext will only be lowercase english letters, t...
So I have a set of coordinates and I will hash these with a random salt with SHA256. Coordinate range is 0,100. salt = abc [1, 5] = "sZv6eqPT9bqGiXbjvO8yrb4wuFjl0Z1CwSHdnIgGqEI=" [3, 4] = "8XgDJ/rrDELExVflBfDOLjqV5SB//8urxN5I6hxK9Mo=" [6, 3] = "FTzCfctBaBKp/wmopgMw7YFRpo1z2p6/IdHVujFliGs=" [1, 6] = "t2WE+ba8pt0ZEo0uW3u...
If I understand correctly MAC makes sure that the encrypted message isn't altered, so I presume signing the message with for example ed25519 would do the job too. Am I right?
Blowfish has a large key setup penalty, except is fast once it gets rolling. I believe that before AES optimizations became commonplace, it was faster than AES after the initial key setup. It's top speed once it gets rolling is good for bulk encryption, except it has a 64 bit block size. Would the following address ...
Let $F$ be a pseudorandom function (length preserving). We have the following scheme: To encrypt $ m \in \{0,1\}^{2n}$, parse m as $m_1||m_2$ with $|m_1|=|m_2|$, then choose $r\leftarrow\{0,1\}^n$ and output the ciphertext $(r, m_1\oplus F_k(r), m_2 \oplus F_k(r))$. Is this scheme EAV Secure? I think that it is not EAV...
Assume that we use the key to perform a uniform permutation to generate a sbox. The literature is rich supporting the statement that a random Sbox can make any cryptographic scheme weaker. I have tested and found the randomly permuted sboxes possess weak nonlinearity and high differential probability. We know that to p...
I'm looking at the AES-CMAC RFC and I found somehow counter-intuitive the way test vectors are used in the test code. Let's look at the key K K 2b7e1516 28aed2a6 abf71588 09cf4f3c The least significant octet is 0x3c, right? If this is true, why it becomes key[15] and not key[0] in the test code? unsigned char key...
Let's say you need to encrypt plaintext which is 1 TB big. You have a password pwd. This very classical AES-GCM process is applied (pseudo code): salt = 16 random bytes key = PBKDF2(pwd, salt, count=1000*1000) # key derivation function nonce = 16 random bytes ciphertext, tag = AES_GCM_cipher(key, nonce).encrypt(plaint...
In post-quantum signature schemes that are (to put it simply) built out of merkle trees, they usually employ some sort of OTS scheme on the very bottom leaves. I.e WOTS Winternitz scheme. A relatively simple scheme such as Merkle is making a bunch of Lamport/WOTS keys and putting them on a merkle tree. Is it possible ...
Section B2 of FIPS-202 specification describes the Hexadecimal Form of Padding Bits which is basically the translation of the bit padding 0110*1. However at the beginning they suppose that the message is "byte-aligned, i.e., len(M) = 8m", so what should I do if it is not (ex when the length is odd)? In section B1 they ...
There a plethora of signature scheme's but I am wondering if there are scheme's with the following properties: Given that you know the message, alter the signature with the public key in such a way that a new signature is created (a different hash) but is still valid for the given data. The reason I am looking for this...
Suppose there is a new scheme, for the sake of argument let's call it a CEPQSS - CryptoEnthusiast's Post-Quantum Signature Scheme. Now most practitioners aren't convinced that using this is a good idea let alone that it works. But the results are completely valid. How long would it take until most practitioners evaluat...
For background, a HKDF (hmac based key derivation function) takes the form of Ko = KDF(Ki, Label, Context, Len) where Ki is the input key and Ko is the (usually longer) output key, computed by iteratively applying HMAC (initially keyed by Ki) until the desired length is reached. See pseudocode here. Can I assume HKDF i...
Based on the BSI evaluation criteria for quality of deterministic random number generators: K4 – It should be impossible, for all practical purposes, for an attacker to calculate, or guess from an inner state of the generator, any previous numbers in the sequence or any previous inner generator states. What is exactl...
I just found this draft/informal IETF specification: Alternative Elliptic Curve Representation: This document specifies how to represent Montgomery curves and (twisted) Edwards curves as curves in short-Weierstrass form and illustrates how this can be used to implement elliptic curve computations using existing implem...
I come from an engineering background, but not from computer science or anything to do with pure math. I studied applied math in college--never abstract algebra, number theory, or discrete math, formally. I have been a programmer most of my career. Having developed a keen interest in cryptography, I learned number theo...
After reading a comprehensive paper [1] covering various kinds of generalized Feistel networks, I've tried to implement the Unbalanced Numeric Feistel variant, which relies on modular arithmetic for splitting and joining an integer in two smaller parts. Given the scarcity of example implementations for this kind of cip...
I was thinking about the Diffie-Hellman key exchange. One fact that we seem to know is that given a group generator $g$, a prime $p$ and the expression $g^x \bmod p$ its believed to be hard to find $x$; or more accurately $x \bmod(p-1)$. Now the question is, what if we gave away some extra information. Such as $g^{x^2}...
$p$ is a big prime. $p>2^{2048}$. So how to caculate the summation of successive modular inverses over $p$? $$ \sum_{i=1}^{\frac{p+1}{2}-1}{i^{-1}}\pmod p $$ As to $p$ is a big prime, it's impossible to caculate the modular inverses one by one and sum them at last. I found someone give a formula which approximates the ...
The BGW protocol gives us security aginst a dishonest minority of parties, with round complexity linear in the function's circuit depth. Several works (like ABT18 or LLW20) use the BGW protocol to get 2-round MPC by reducing the functions degree to 2. However, I don't see how BGW gives us a 2-round protocol. You need o...
I have read the paper [ABB10] several times but I still cannot understand thoroughly the "artificial abort" in the security proof of the adaptively-secure IBE in the paper. So my questions are: What is exactly the $\gamma(\cdot)$ function in the Artificial Abort step? From what I found in this paper (on page 14), it s...
I have a message that I want to send to multiple recipients. Can I encrypt the message separately with each of the recipient's public keys, then send the message thus encrypted to the respective recipient? If an attacker obtains all the encrypted messages and knows that all of them have the same content but are encrypt...
I'm studying GPS, asymmetric identification scheme from the NESSIE project. I found a bunch of helpful information about it in the original submission, they even mention minimal implementation examples (in C/GPS-C.pdf of submission archive). But they only mention them and provide instructions on how to compile them, so...
one.ttf (3f67f2feb32a72cf4b90c767eb43aa52) two.ttf (8880bae64dc9e6ba22446f789d09d3d7) I want to set one.ttf md5 hash to two.ttf It is possible? Like this one.ttf (3f67f2feb32a72cf4b90c767eb43aa52) two.ttf (3f67f2feb32a72cf4b90c767eb43aa52)
If I want to encrypt structured data composed of key-value pairs of strings, would it be an advantage to use an encoding that stores keys, values and their lengths, and is padded with random numbers, rather than JSON that always starts with {", ends with "} and predictably contains strings enclosed in "..." separated b...
I came across a piece of software that uses the following algorithm to generate a symmetric encryption key to encrypt data. Generate a non-secret 64 byte random string $M$ (fixed challenge) Generate a secret 20 byte random string $K$ (HMAC key) Compute $E = \operatorname{HMAC-SHA1}(K, M)$ $E$ is a 20-byte encryption ...
I've been reading about The discrete logarithm problem as of recent and i decided to try it out on a small portion of numbers myself and i actually came to a mental gridlock after watching this Video. In the video, he uses the mod p which is prime to find a specific generator point (which is also prime) that could ite...
As far as I know JWE (JSON Web Encryption) supports both integrity and confidentiality. I agree about the confedintiality because only the recepient with a private key can decrypt a message. What about the integrity? Given that the Content encryption key is encrypted using a public key, anyone (who knows the public key...
Consider a block cipher whose block length is . = 2 is number of possibilities. Imagine we have plain text-cipher text pairs { , = () } , where the key selects one of the ! Possible mappings. Now, imagine you want to brute force this encryption algorithm for the key. In each try, you generate the test key ′ and ch...
Given a keyspace of $ 2^{80} $ and plaintext space of $2^{64}$. And two plaintext and ciphertext pairs $(x_1, y_1)$ , $(x_2, y_2)$. Now we have $2^{80}/2^{64} = 2^{16}$ keys that encrypt $x_1$ to $y_1$ and another $2^{16}$ keys that encrypt $x_2$ to $y_2$, with only one key that is supposed to be the target key (correc...
I've read that the Blake3 hash uses a Merkle Tree. Does it follow that there are identities such as: b3sum("This is ") xor b3sum("a test.") == b3sum("This is a test.") The example above does not work, perhaps because the block size is not eight bytes. Are there any real Blake3 identities of a similar form?
This is from the transcript of Dan Boneh's Coursera Crypto course https://www.coursera.org/learn/crypto/lecture/mQAkP/real-world-stream-ciphers So it turns out this is easy to break in time roughly two to the seventeen. Now let me show you how. So suppose you intercept the movies, so here we have an encrypted movie th...
I'm doing a spare-time project to collect cryptographic algorithms, implement them, and lastly benchmark them. For the CSPRNG part, I'm evaluating NIST-SP-800-90Ar1 HMAC-DRBG and CTR-DRBG (Hash-DRBG had problems so I dropped it), and I wonder how better HMAC-DRBG will perform if HMAC was instantiated with BLAKE2 instea...
I'm having trouble with a definition in the HQC Specification. From page 25f., in section 2.5.5.: What does it mean to duplicate a code? Is it repeating each bit, similar to a repetition code? Further, I don't understand the type of the function $F$: $\mathbb{F}_2^7 \to 3, 1, -1, -3^7$. Is this a typo, and it should ...
Apologies if this is already answered somewhere, but I could not find it. I have a setup where a client has a JWT (RSA- or ECDSA-signed), and needs to prove that fact to the peer which issued the token in the first place, in a way that's safe against person-in-the-mittle attacks. The peers have no prior knowledge of ea...