instruction
stringlengths
32
27.2k
For this question my focus is exclusively on symmetric block ciphers (with a particular interest in AES256 in CBC mode). I have read much discussion on various ways to pad the plaintext so that the length of the input to the encryption algorithm is a multiple of the blocksize. The real problem here is not padding to a ...
Let a function $f$ be one-way, if there exists a probabilistic polynomial time algorithm to find the preimage of $y = f(x)$ for uniformly chosen $x$ with non-negligible probability. Define the function as $f(x,y) = x\times y$, where the values of $x$ and $y$ range across the integers in $[2^{n-1}, 2^n-1]$ (basically, t...
Note that I am asking specifically for Partial Homomorphic Encryption (PHE) schemes and not Somewhat Homomorphic Encryption (SHE) schemes. I believe there are several SHE schemes that are symmetric but I am not familiar with any PHE schemes that are symmetric.
https://www.rfc-editor.org/rfc/rfc4418#section-3.2.1 describes the parameters for KDF as follows: Input: K, string of length KEYLEN bytes. index, a non-negative integer less than 2^64. numbytes, a non-negative integer less than 2^64. My question is... why is index defined as "a non-negative integer ...
I understand that if $p$ is prime then $p-1$ must be composite (at least divisible by $2$ as it is even). But how does an algorithm find a prime $q$ such that $q \cdot r = p - 1$. I thought prime factorisation is such a hard problem?
I know hashes can be used to construct symmetric encryption schemes (HMAC running in counter mode), signature schemes (SPHINCS), pseudorandom generators, etc. One thing that's missing is public key encryption. Is it possible to create a hash based public-key encryption scheme? My intuition says no. But it would be nice...
In "Certificate details -> key usage -> CRL Signing (06)", what does "(06)" in "CRL Signing (06)" mean?
We are given a list of possible strings, there are $32^{16}$ ($=2^{80}$) to be exact. We also have the unsalted SHA512 of the original target string. How long would it take to go through those strings, generate an unsalted SHA512 hash and then check if that hash matches the target hash? It's for a research project, we ...
I am currently doing some reading on Homomorphic Encryption for research purposes and based on my reading using the Boolean Circuit Model of Computation specifically in regards to Fast Fully Homomorphic Encrytion over the Torus(TFHE) how is it considered fast and why is the noise growth and depth negligible?
I want to encrypt several files with the scrypt encryption utility. Here is an overview of its file format, which gives an indication of what it does: scrypt encrypted data format ---------------------------- offset length 0 6 "scrypt" 6 1 scrypt data file version number (== 0) 7 1 log2(N) (must be betwee...
Is it safe to use the SHA256 of a hard-to-bruteforce string as the key to encrypt data with AES256?
I would just like to ask what is the classification of both BFV and CKKS scheme are they Somewhat Homomorphic or Fully Homomorphic? Brakerski/Fan-Vercauteren (BFV) [Brakerski12, FV12, BEHZ16, HPS18] https://eprint.iacr.org/2012/144.pdf Cheon-Kim-Kim-Song (CKKS) [CKKS17] https://eprint.iacr.org/2016/421.pdf
This is a follow-up to a previous question about encrypting IV/MAC results from AEAD ciphers. I have a system I'm working on that needs to use standard (NIST/FIPS) cryptography, at least for its primary security layer. This is going to be AES-256/GCM used exactly as directed. I am also going to have periodic re-keying ...
I have read some papers that give the definition of one-wayness of PKE schemes. Let $\Pi = (G,E,D)$ be a PKE scheme, and the security game of OW-CPA is defined as follow: $$\mathrm{Adv}_{\Pi,\mathcal{A}}^{\text{ow-cpa}}(k) = \Pr\left[ m = m' \left\vert \begin{gathered} (pk,sk) \gets G(1^k) \\ m \gets \mathcal{M}_{k} \\...
Are there any interesting connections between the fields of data science and cryptography? Data science involves the use of statistical analysis to analyze data while cryptography also involves statistics in crypt-analysis in order to protect data. And of course both fields require a lot of math. So I wonder if there a...
Wondering if anyone knows a good reference for Pollard's $p-1$ algorithm's runtime? I was looking on the Wikipedia page and the runtime cited there is $\mathcal{O}(B\cdot \log B\cdot \log^2 n)$. However, I can't find any reference on the Wikipedia page to this. Where / how is this result proven?
Just started reading Oblivious Transfer. I am searching for a proof of security based on RSA implementation but I can't find anything simple to understand. Can someone direct/show me to an easy to understand proof of it's security? Many thanks
I was wondering how can I use NIST Statistical Test Suite to check for the randomness of output generated by a cryptographic hashing algorithm, let say SHA-256? To be specific, how will I generate input for the suite? For block ciphers, we use key avalanche, plaintext and ciphertext avalanche, etc as inputs of the suit...
If there is a message $m_1$ that $H(m_1) \rightarrow g^r$ and there is another message $m_2$ that $H(m_2) \rightarrow g^k$, where $g^k$ is also a generator of $G$, is this possible? then $g^r$ could equal $(g^k)^m$, where $m < p$, $p$ is the order of $G$. Then any message could be expressed in this form $(g^k)^m$, so i...
I only know one way, if this group is a cyclic group, and we know the element can be expressed in $g^m$, then $g^{(m/2)}$ is the answer. Another question, if $m$ is an odd number, can we be sure there is no answer? Is it possible to find another generator $g_1$ and an even number $k$ that satisfy the element = $g_1^k$...
I am new to algorithim randomness and confused at I guess a basic level question. Is it common for any cryptographic algorithim to have repetitions in its output i.e.let say 34 and D8 are two consective bytes which are repeting at random intervals. I have got an encrypted file and it has 34 D8 at line 5 and then same ...
Do PHE schemes in general also suffer from noise overflow problem?
Let $k$ be uniformly sampled from $\{0,1\}^\lambda$, $F$ be a secure PRP with block length $\lambda$ and let $Enc(k, m)$ be such that it returns $c = (F(k,r), r \oplus F(k,m))$ with $r$ uniformly sampled from $\{0,1\}^\lambda$. How to prove that this scheme is not CCA secure? In particular, how can an attack be thought...
Would there be an efficient way to implement a function with the following signature: unsigned long long int random_word(size_t n, size_t m) that would generate a random machine word (64 bits here) such that exactly m bits over the n least significant ones at set to 1. For example: random_word(10, 3) would generate a...
The multiplicative group mod $p$ is isometric to the additive group mod $p-1$, yet computing discrete logarithms in the additive group is easy and completing discrete logarithms in the multiplicative group is usually hard. What is it about group representation that makes group representation matter so much for the comp...
I am very interested to know in the general sense how two parties who know each other are able to continue a conversation IF and ONLY IF they both earn the same salary. For example, we have a person X who earns 75000USD, but they only want to continue speaking to person Y IF and ONLY IF person Y also earns 75000USD. Th...
I want to implement the homomorphic encryption scheme proposed in GSW13, and make some changes to it, but seems that there is no library that has already been implemented it. Since this is a homomorphic encryption scheme based on LWE, both Helib and SEAL have implemented some other LWE-based homomorphic encryption algo...
Earlier today I was answering a question on the ethereum SE site that analyzed the potential for more than one private key on curve secp256k1 (which maps to a distinct public key) to control the same ethereum address which are derived by hashing the public-key with Keccak256 as a byte array, and whether the rightmost 1...
There are $2^n!$ possible permutations of an $n$-bit block cipher $E_k:\{0,1\}^n \rightarrow \{0,1\}^n$, and any given key $k$ selects one of these permutations at random. Define equivalent keys as a pair of keys $k \neq k^\prime$ where $\forall P:E_k(P) = E_{k^\prime}(P)$ and $P\in\{0,1\}^n$. The probability that such...
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 ...