instruction
stringlengths
32
27.2k
I am looking into various one way functions and I stumbled upon a Rabin function, which is squaring modulo an RSA modulus $N=pq$, where $p,q$ are prime: $R_N(x) = x^2 \mod N$. Would it lose the one-way property if $N$ is prime and not a product of two primes? UPD: Also, is Rabin function still one-way if factorization ...
I had asked an unanswered question earlier and now, I think I have an answer (sort of), not really but I think I know where to look for it. We assign each type of card combination a score such that a winning card combination always has a higher score and a tie always have equal score.The two players then play Yao's mil...
This is not a question about whether I should encrypt or sign first, as I've read here. Rather, it's about whether I should sign, then encrypt, then sign again. Because as far as I know, there is no way of knowing a sender identity before decrypting. And if a malicious party were to encrypt some virus, only after decry...
In "Finding Hash Collisions with Quantum Computers by Using Differential Trails with Smaller Probability than Birthday Bound" the authors Akinori Hosoyamada and Yu Sasaki state that it may be possible to perform collision attacks with of a lower order than $O(2^{n/3})$ using BHT [1]. Bernstein remarked for BHT that it ...
I’m looking for the existence (or the proof of non-existance) of a method to prove (with arbitrary certainty) that a particular output is the result of a particular algorithm applied on a particular input. $$ f(x) = y $$ How can I prove the above equation holds by knowing all of its constituents but without actually ap...
Can someone please explain to me what are the steps used to get this result (0.9154n+0.8876) from this equation $$(2n+2){T}_{ecc}^{sm}+(2n){T}_{h}+(2n+2){T}_{ecc}^{pa}+(2n){T}_{ecc}^{sm-s} \approx 0.9154n + 0.8876?$$ where ${T}_{ecc}^{sm}$ =0.442, ${T}_{h}$= 0.0001, ${T}_{ecc}^{pa}$= 0.0018, and ${T}_{ecc}^{sm-s}$= ...
I'm reading this article, but I could'nt figure out Definition 1 (Access Structure) on page 3, section 3.1. It says: Let $\{P_1, P_2,...,P_n\}$ be a set of parties. A collection $\mathbb{A} \subseteq 2^{\{P_1, P_2,...,P_n\}}$ is monotone if $\forall B,C:$ if $B \in \mathbb{A}$ and $B \subseteq C$ then $C \in \mathbb{A...
Let us assume the SubBytes operation changed to just shift right operation. for example - f(00011101) = 10001110 How we perform a Known/ Chosen Plaintext Attack and find the key? How much time does it take to find it?
Scenario: Alice and Bob send each other encrypted AES (128) messages. In order to change key, Alice has a public RSA key (2049 bits). Bob has Alice's public key. Bob picks a random AES key, encrypts it, and sends it to Alice. Alice decrypts the RSA encryption, if the result is bigger than 2^128, Alice assumes an error ...
Lets say p = str and h = SHA512(p) i send the h which is the SHA512 of p to a friend using via email my friend in order to be sure that I'm the right person ask me to prove that I know the p. How can I can prove that I know p without disclosing it ?? As I have read so far its possible via zero-knowledge proof. Any pse...
BitTorrent uses SHA1 for its hashes, but SHA1 is unsafe and people can tamper the preimage and still obtain the same hash, right? So imagine I want to be very sure the file I'm sharing on BitTorrent will be correctly downloaded by who is downloading it. Does it work to include 2 files, being: The file I'm actually sha...
Quantum key distribution using BB84 protocol. The Secure key rate $R$, is given by $$ \quad R=1 - 2h(e_b) \tag{1}\label{q1}$$ where $e_b$ is the quantum bit error rate (QBER), $h(x)$ is the Shannon entropy and is $h(x)=-x \log_{2}(x)-(1-x)\log_{2}(1-x)$. How do we calculate the threshold for BB84 using equation $\eqr...
In ECC we have: if we know $G$ and $P=kG$, it is very difficult to find $k$. I wonder whether or not in NTRUEncrypt: if we know $h$ and $P=rh$, it is difficult to find $r$?
I need help for my bachelor thesis. I have a general question regarding hybrid encryption in different ransomware. The hybrid encryption often uses symmetric and asymmetric encryption techniques. During an infection the symmetric key will be generated on the system. This symmetric key will be encrypted with the public ...
I wonder if it's possible to have a peer-to-peer group chat protocol, where anybody is free to join the chat and broadcast with a chosen username to all others who have joined it, but with a strong anonymization property. The property desired is that it is impossible, or at least difficult, for a man-in-the-middle to ...
I was reading an article titled "A Novel Method for Polar Form of Any Degree of Multivariate Polynomials with Applications in IoT" (doi:10.3390/s19040903) I read the following statement: "Identification schemes are the most important elements for many area, such as devices connected to the Internet" I do not fully un...
Even after reading their paper I am still not able to understand why the scheme is secure and what an adversary should do to break it. This question might look stupid to most of you but I don't have mathematics background to delve this deep into cryptography.
Consider the following variants of the CSIDH squaring problem. P1. Given $sE, E$ where $s$ is a random ideal class and $E$ is a random curve (reachable from initial $E_0$), find $s^2E$ P2. Given $sE_0$ where $s$ is a random ideal class and $E_0:y^2=x^3+x$ is a fixed initial curve, find $s^2E_0$. Of course, there's also...
I was told that for both cases the PRF is strong/secure, but I cant find a proper way to define this. Personally i think only (b) is secure because $x$ is not as strong as $O^n$ for $Fs$. But if that was true, what would be the ppt algorithm which could break it? Is it related to the fact that $F(x)$ is not pseudorand...
Is there a proof by now that Paillier is secure against chosen-ciphertext attack? The original Paillier paper mentions that it is not.
I've got an RSA encryption I need to crack, but to do it I need to find the p and q values of an N I am given - it's quite large, around 308 symbols. I know that N is the product of primes p & q, but I don't know what kind of searching algorithm I'd implement to find the exact p & q that fit |p-q|<10000. Since it needs...
Regarding SubtleCrypto and curves P-256, P-384 and P-521. Can I mix two different curves for key derivation? For example performing key derivation between P-256 and P-521. EDIT: Can I mix two different curves to derive data? (So not to derive keys, it is not what I meant)
I'm looking for a very fast function $f(m, k) $ that takes a 64-bit integer $m$ and a fixed secret key $k$ of virtually any size (generated by a CSPRNG) and turns them into a 64- or 32-bit integer $ r $, with a few additional requirements: $ r $ must depend on both $m$ and $ k $ and be reasonably well-distributed if a...
I have a PGP Private Key from Bob. > -----BEGIN PGP PRIVATE KEY BLOCK----- > > lQG7BFh+OvsRBAC4BTddbmKShCdUg+/2GjnpE0c3oH/SaFv1Fm3jZj8M8/U76GAu > 51t9o9mJn6HKe5QHN5e8TknaeYDQ36eOPgnLldikW2uQTsxY3pqMuULsHUUJynhj > jiYNUUdHGMadDf5mB9aTzfmvNPuPj5iF+W9ik1qcDzl6mcOdDfEuEw3OpwCgq8C1 > oe90IcoHcdG9hLGRrZcH/f8EAKf3YjLQeFhUvAF...
How do I decode some text that has been encoded like this: affine(vigenere(text, vigenere_key), *affine_key)? I don't know keys to either of them. At first I thought I could just bruteforce it by trying out all possible combinations, but then I realised that cracking Vigenere is based on finding keyword which can be li...
I investigated the IPsec Protocol. I am wondering if I can remove/reduce any field to save space, is there a way to save overhead in ESP packages?
So I was just curious. I really look up to Blockchain technology and I have read that Bitcoin uses double SHA-256 for hashing. ( from what I understood, double sha256 is essentially $\operatorname{SHA-256}(\operatorname{SHA256}(value))$ ). Is double SHA-256 better than SHA-512 or any other hashing algorithm that bitcoi...
To be clear I'm well aware that ChaCha doesn't need to be "improved". Also, I have no intentions or misguided ideas about trying to "improve" it. My question is hypothetical, and is inspired by the comments on this answer I am also aware that ChaCha does not require any padding scheme, and that any positives from the...
I need to encrypt file and directory names/paths but I need the encryption to be deterministic. I need to sync the local files with a cloud storage provider so I can't use probabilistic encryption. Know that you should not use a static IV when encrypting text, would this be an acceptable work around: Run passphrase th...
I'm trying to make a password manager for Windows installed computers, and after researching the best ways to encrypt the passwords in the database (I'm new to cryptography) I think I've come up with a good way to do it, but I'm still not sure. How the key is made when the user first opens the program: The user inputs...
So I've been analysing some Javascript Obfuscator. I understand how the strings are decrypted, my interest is now into building the actual encryption method for those strings. I'm not going to post the full decryption method as my only concern is the actual cryptography part, but basically the algo just swap character ...
I always assumed that a hash function allows input of arbitrary length, since that's what all the hash functions I was aware of did. Wikipedia's definition of a hash function is as follows: A hash function is any function that can be used to map data of arbitrary size to fixed-size values. However, some functions lik...
Two devices are communicating only with each other and shall do this with AES encryption. Both devices are offline, have very limited storage and use a small cryptographic coprocessor which is able to perform AES/ECDH/ECDSA/RNG. Also keys and certificates can be stored in it. Any device must work with any other device,...
A message authentication code (MAC) based on using a hash function with the secret prefix $H(k||m)$ technique goes back to two independent sources according to Tsudik's article on 1992; S. Crocker, S. Kent, Private Communication, December 1990. J . Galvin, K. McCloghrie, J. Davin, Secure Management of SNMP Networks Pr...
I am not exactly sure what is the difference between zk-SNARK and NIZK? Are NIZK not succinct? If so, why Pinocchio protocol considered itself a NIZK although they have succinct proof? I tried Google but couldn't find the exact difference.
According to RFC 1321 § 3.2 (MD5), the length of the message ($b$) is encoded as $b \bmod 2^{64}$: A 64-bit representation of b (the length of the message before the padding bits were added) is appended to the result of the previous step. In the unlikely event that b is greater than 2^64, then only the low-order 64 bit...
This came to mind the other day and I'm wanting to know if there is a name for the following algorithm (I'm not sure if "cipher" is the right word for it): Take two consecutive letters at a time (not just one). Perform the A1Z26 cipher on each letter to get their position in the alphabet as numbers. Take the differenc...
I would like to calculate the possible password combinations for a password that is 60 characters long, has the letters a-f and numbers 0-9. Also no character should repeat successively more than 7 times. Is there any way to calculate the possible combinations? Thanks in advance.
Consider a $k$-bit block cipher with $r$ rounds, and key composed of $r$ subkeys $K_i\in\{0,1\}^k-\{0^k\}$ (that is, non-zero $k$-bit bitstrings), for $i\in[0,r)$. Plaintext is $P=S_0\in\{0,1\}^k$, ciphertext is $C=S_r\in\{0,1\}^k$. At round $i$: $$S_{i+1}=\begin{cases} S_i+K_i&\text{[addition in group }(\mathbb Z/2^k\...
Are there any encryption algorithms that require significantly more work to decrypt, versus the amount of work required to encrypt? I'm looking for a method of fast encryption, but which will require much more CPU time to decrypt later, as a method of spam prevention (prevent people from decrypting too many files in a ...
I am trying to learn about the underlying functionality of the different hash functions (currently SHA) and I'm pretty stuck even after watching a Stanford video about it. One method of hashing is by using Merkel-Damgård construction with the David Meyers function and SHACAL-2 block ciphers. As far as I understand MD i...
Assume we have point $A(x_A,y_A)$ and point $B(x_B,y_B)$, and now we want to generate a point $C(x_C,y_C)$ so that $A,B,C$ are on the same straight line. All mod $p$. If $A$ or $B$ could not be revealed, how to do that? Could homomorphic encryption help? I learned about BGN, but I think it is useless because there're t...
I am working on an LWE instance where q is a power of 2 and I'm wondering if there is any literature about attacks in this context, especially if there are any attacks which work significantly better. I know about the general attacks (combinatorial, lattice based, algebraic) found in Concrete Hardness of LWE for exampl...
If one were to take a message, say "Hello world!", and compute the MD5 hash: 86fb269d190d2c85f6e0468ceca42a20 Then, taking the MD5 hash of this, and repeating that procedure: d522231cf8bd5bd3bceb31c640bcab9a 64bb07c8a424dbb918495fa428702998 ed64b3e94672013dd88c415b8575dede 95119774bf93c232892b4f3071348abd 0d1fff8e1...
I'm confused as to how he got (62, 44) as an answer within this article: https://www.coindesk.com/math-behind-bitcoin
I have read that basic replacement ciphers, such as replacing one byte with another specific byte at each location, are far less effective with non-randomized data. My question is, can this problem be mitigated to the point where basic ciphers can be effective on structured data by encrypting the data with other method...
I was watching this FHE video and it define Regev encryption scheme as fallow : kyegen: sk : choose $t = (1,s)^t \in \mathbb{Z}_q^{n+1}$ pk = $A \in \mathbb{Z}_q^{m*(n+1)}$ random except $[A * t]_q$ small Enc: for random $r \in \{0,1\}^m $ output and $\mu \in\{0,1\}$ $c \leftarrow (\mu,0,...,0).\frac{q}{2} + r.A$ ...
I've asked before if some kind of canonical encoding should be used on the input parameters of SHA-3 before it could be used as replacement for HMAC. However, if I read the current NIST specifications in NIST SP 800-185 correctly, there is no Keypack function defined. The Keypack function prefixed a key size to the key...
I recently began to look into some information about obtaining the private key $k$ when two signatures have been produced using the same $m$ and $k$. I've been using the well-publicised information about how the Sony PS3 private key was leaked, where: $$m = \frac{e_1 - e_2}{s_1 - s_2}$$ $$k = \frac{e_1s_2 - e_2s_1}{R(s...
I wanted to learn more about secure messaging and started a personal project using the libhydrogen library. From my understanding, instead of using public-key encryption, the library relies on the noise protocol framework to create ephemeral session keys shared by both parties to encrypt and decrypt messages. I was won...
The NIST 800-63B publication specifies recommendations regarding memorized secrets (passwords) https://pages.nist.gov/800-63-3/sp800-63b.html#memsecretver specifically section "5.1.1 Memorized Secrets" When processing requests to establish and change memorized secrets, verifiers SHALL compare the prospective secrets a...
Searching about RSA signature forgery I came across this question. In the answer, it is stated that for small to moderate $e$ (including $e=3$ and $e=2^{16}+1$, often used in practice), it would be possible to forge a large class of messages, including C strings showing as anything desired. For any $m_0$, it is easy t...
Some time ago I read an explanation of the key generation process of NTRUEncrypt, where it was stated that a polynomial $f$ should have "small" coefficients. It defined the number $df$, which configured the space of this polynomial to have coefficients in the set $\{-1,0,1\}$ such that $df$ is the number of 1s and $(df...
OpenSSL supports TLSv1.3 record padding: https://www.openssl.org/docs/man1.1.1/man3/SSL_CONF_cmd.html but I'm not sure if it works like I think it does. If I would choose a factor of 2 it would make the record (=packet/payload length???) twice the original size. Is that correct? If so, wouldn't random padding be better...
TL;DR; Assuming I'm calculating SHA256 for an ECDSA, does it make sense to do SHA256(item1 + SHA256(item1') + item2 + SHA256(item2') + itemN + SHA256(itemN')) or it's the same (security-wise) as SHA256(item1 + item1' + item2 + item2' + itemN + itemN')? (hereunder + refers to as binary concatenation of operands' content...
In the question Does a hash function necessarily need to allow arbitrary length input? many answers talk about the theoretical limit of the SHA-2 functions being $2^{64} - 1$ bit due to padding. I was wondering, is there a secure way to extend this? From the description, it seems that the $2^{64} -1$ bits is not a secu...
The wikipedia page of Ring Signature states: Another application, also described in the original paper, is for deniable signatures. Here the sender and the recipient of a message form a group for the ring signature, then the signature is valid to the recipient, but anyone else will be unsure whether the recipient or t...
$K_{pub} = (n, e)$ $K_{pvt} = d$ Then $E_{K_{pub}}(x) \equiv x^e \mod n$ Practically, when RSA is used to encrypt strings, what is the $x$ here? You cannot take it byte by byte because $\mod n$ will result in values larger than a byte. So what is done?
Diffie-Hellman Key-Exchange (DHKE) should be used carefully during the end-to-end encryption. A man-in-the-middle (MITM) attack is possible. Standard DHKE The simple protocol on the multiplicative version as this Alice and Bob agree on the modulus $p$ and a base $g$ ( For security see Safe Primes ) \begin{array}{lcl}...
In the paper Private Set Intersection in the Internet Setting From Lightweight Oblivious PRF, Chase et al. shows that a PSI scheme can be achieved by using an oblivious PRF (OPRF). They summarized a single point OPRF protocol between a sender $S$ and a receiver $R$ that can be used to check if an element $y_R\in Y_R$ h...
AS explained in section 4.5, decomposition for relinearization (2nd step of ciphertext multiplication in bfv) can be done using RNS components of ciphertext. In other words, they proposed a way to do CRT decomposition. My question, if it is possible to do this CRT decomposition when the polynomial is in NTT (point- val...
In analyzing the advantage of distinguishing LWE via dual attack, many papers uses the result of [LP11] as follows : Given an LWE instance parameterized by $n$, $\alpha$, $q$ and a vector $\mathbf{v}$ of length $||\mathbf{v}||^2$ in the scaled dual lattice $L = \{\mathbf{v} \in \mathbb{Z}^m_q| \mathbf{w} \mathbf{A} ≡ ...
I've read that encrypted data should be, theoretically, indistinguishable from random data. Using this principle of encryption, could I combine encrypted network traffic streams to generate either a seed for a randomness algorithm or simply combine them for the random number itself? For example: I could take data from ...
The Arstechnica article title as "A (relatively easy to understand) primer on elliptic curve cryptography" claims this; In fact, you can still play the billiards game on this curve and dot points together. The equation for a line on the curve still has the same properties. Moreover, the dot operation can be efficientl...
Im looking at a Client Hello message in wireshark, the client supports 1.2 and 1.3, but Wireshark says the client used TLSv1.3 record layer when the server hasn't replied yet the choosen version. How can this be explaned? Also, why after that i see version 1.0 and version 1.2 if version 1.3 was used?
I have two devices that use a PSK. One is embedded and extremely resource confined. I'm already using ChaCha20-Poly1305 so it would be "free" to reuse this. There is no transport encryption layer, all clear and has middlemen. I want to establish a randomvalue/salt/kdf-base and send this to the other device on authentic...
I am new to ECC. I have just read about the elliptic curve $y^2=x^3-x+1$. I am copying the exact line The elliptic curve is super-singular $E:y^2=x^3-x+1$ in affine coordinates defined over a Galois field $GF(3^m)$, $m=97$, whose irreducible polynomial is $x^{97}+x^{12}+2$. Now I have three questions. How is this cu...
Sometimes Whatsapp shows that an attachment was often forwarded. How do they know this if the message is end-to-end encrypted? Even with hybrid encryption I encrypt with my key and store my attachment on the server. So do they hash the attachment in the client and store the hash? So they would know what attachments I f...
I have only 18 bytes in which to store a (randomly generated) key. Is it more secure to: use AES-128 and a 16 byte key, use AES-256 and a 18 byte key padded with 14 zero bytes to make a 32 byte key, or use AES-256 using a KDF to turn 18 bytes into a 32 byte key, each time it is needed?
I am curious whether one can do Pedersen commitment on $GF(2^n)$. One method I thought of was to get a prime order multiplicative subgroup of $GF(2^n)$. But for efficiency and security, what would be an appropriate value of $n$ for a security strength of 128-bit security?
I want to implement some (lattice based) protocols to better familiarize myself with a programming language (Rust). These tend to do arithmetic over rings like $\mathbb{Z}/m\mathbb{Z}$, or "extensions" of this ring (meaning $(\mathbb{Z}/m\mathbb{Z})[x] / (f(x))$. Since it seems like I'll need to implement the ring arit...
Rijndael was the only AES candidate which defined a different number of rounds for their 128, 192, and 256-bit versions (10, 12, and 14, respectively). The others had a fixed number of rounds (32 for Serpent, 16 for Twofish, etc.) regardless of the key size. Why was this? It may have reflected the intention of having t...
how to use the plaintext from that was decrypted form a cipher text using key = 3 in Caesar Cipher and using that plain text with the following ciphertext to get the key.
Given generator $g$ of a multiplicative group mod a prime $p$ the Diffie Hellman problem is to find $$g^{xy}\bmod p$$ from $g^x\bmod p$ and $g^y\bmod p$. The best way to solve this is through discrete logarithms. Assume we can do this without breaking discrete logarithms. Then is computing $g^z\bmod p$ from $g^{z^2}\bm...
I am trying to implement arithmetic over points on a short Weierstrass elliptic curve and I have trouble with corner cases of the points addition operation. Let me specify the parameters of the curve and what is the problem exactly: As a test curve I use Bitcoin elliptic curve $y^2 = x^3 + 7$ For testing purpose I do ...
In the RSASSA-PKCS-v1_5 signature scheme, the first step is to perform an encoding on the hashed data. (0x00||0x01||PS||0x00||T). Is this encoding important for security ? What happens if the hash is directly encrypted without encoding ?
In an RSA-encryption scenario, Bob's public key pair $(n, e)$ is $(143, 43)$. An attacker Mallory tries brute-force and comes to $d = 7$ as the private key. The value of $φ(143) = 120$ is not known to Mallory. However from $43 \cdot d \equiv 1 \pmod{120}$, one can calculate the first positive element $d = 67$ from cong...
A while back I designed a protocol for en encrypted key/value service. My main goal was to minimize the value of a breached database by using cryptographic algorithms where a brute-force cracking would be infeasible for, say, 30 years. I was happy with the pattern I developed, but I'm no expert, so thought at least an ...
ECDSA or DSA in general was to sign a message or data using private key and verify it using public key, if the attacker/imposter doesn't have the private key then they couldn't sign the message properly. If ECDSA private key was kept private, can the signature verification of ECDSA be used for user to login into a syst...
I'm trying to encode an Ed25519 private key as a PEM file based on this document https://www.rfc-editor.org/rfc/rfc8410#page-7 . I'm using an ASN.1 encoder written in Dart, and I can encode the private key without its public key and attributes as in this example: -----BEGIN PRIVATE KEY----- MC4CAQAwBQYDK2VwBCIEINTuctv5...
As far as I know, CBC mode, even with a null IV, will encrypt identical plaintext blocks to unique ciphertext blocks within a single file. The purpose of an IV is to obscure the similarities between multiple ciphertexts, not to obscure the similarities within a single ciphertext. So, would it be just as effective to us...
I'm currently reading "Cryptography Engineering - Design Principles and Practical Applications" written by "Niels Ferguson, Bruce Schneier, Tadayoshi Kohno" published by Wiley in 2010. In "Chapter 9 Generating Randomness", "Section 9.4 The Generator", there are two paragraphs (see screenshot below) which I do not quite...
While going through the article, The MALICIOUS Framework: Embedding Backdoors into Tweakable Block Ciphers. I came across this statement in order to have a deterministic differential characteristic all Sboxes must be differentially inactive (i.e., the input difference of each Sbox should be zero) What does the input ...
I have a question about the chi-square test How can we use it in cryptography? And what results should we expect from it when a file is encrypted? I mean, when a file is encrypted, should its value increase?
I realize that this could be very opinion based, but I feel that there should be some solid information on AES at this point that could be referenced. After 20 years, I expect that there should be a "woulda, coulda, shoulda" list somewhere. For instance, I suspect that one could have gotten away with two fewer round...
Let $C$ be a symmetric cipher $H$ a hash function. Alice uses $C$ with a key $k$ to encrypt plaintext message $m$ yielding ciphertext $c$. She then calculates the hash of the message $h_m = H(m)$ and the hash of the ciphertext $h_c = H(c)$. Alice then sends $k$, $h_m$, and $h_c$ to Bob. Is there any combination of $C$ ...
The following problem needs to be solved: Person A will be guessing the number that Person B has in mind. Only Person B can confirm that the answer provided by Person A is correct. Person A can not be sure if Person B is fair Is there any cryptograhpic way to achieve something like this: A third party will generate ...
I am searching for a citation of a formula that calculates the proportion of true (1) outcomes in the corresponding truth table of a boolean function. Searching a little bit in the Cryptography literature, I found that the hamming weight of a boolean function is defined as the number of $1$'s, so it is close to the met...
I'm mainly trying to wrap my head around the pipeline of encryption, hashing and signing. I've read over this question, describing the overhead of GCM, which I understand to be configurable for space-efficiency at the cost of security, but will be at most 196 bits. This article by IETF, describing the overhead of TLS, ...
So this is my first post on this forum, so bear with me if I sound stupid. I am creating my own web application with JavaScript and MongoDB. I am storing all user information in a Mongo table, and currently this is the hashing algorithm I used to store the passwords: function generatePassword(input) { return Buffe...
What I understand so far: For n-bit block size, there are 2n plaintexts (P) there are P! possible keys The bits necessary to represent each of the possible mappings is log2(P!) rounded up Basically, my calculator craps out at a block size of 8 bits because the key length is so massive to map all possible keys for 8-b...
Given a generic group $\mathbb{G}$ of an unknown order (such as a $3000$-bit RSA group) and a randomly generated element $g \in \mathbb{G}$, is the commitment scheme $\mathrm{Com}(x)= g^x$ not considered to be a computationally hiding scheme for sufficiently large (say, $128$-bit) integers? I thought it was computation...
With my limited knowledge of cryptography and its correct terms, functions (md5, base64, sha, aes or whatever) turn an input into encrypted output. For example, if the following input turns into following output: input | output ______________ A | XX B | YY AB | ZZ my question is: do such cryptography fun...
I am new to cryptography and I am having a hard time understanding what is the need for DHKE procedure. I think I fully understand the principle in which it happens and also the mathematics behind it however I feel it is not needed (most probably I am wrong that's why I am asking you guys here). Let's say a client want...
Considering that $C_n = E_k(M_n) \oplus M_{n-1}$ formula is used in encryption side of this mode of block cipher, and knowing that instead of M0 a randomly chosen initialization vector (IV) is used in Plaintext Block Chaining mode. What would be the formula on the decryption side? $M_n = D_k(C_n) \oplus M_{n-1}$ $M_n...
Premise Several cryptographic primitives employ randomized numerical constants. To avoid suspicious that the designer selected such constants in order to plant a backdoor, "nothing-up-my-sleeve numbers" are used. These are numbers constructed from the first digits of some important constants, like $\pi$, $e$, $\sqrt{2}...
If I know that MD5 input is limited to a character set. can I find any information on the input based on the output? example: input consists of 16 character from list of [1,2,3,4,5]. question: based on the md5 output is there any way to find out information about the input? I.e. which character was at the beginning or ...
Alice has a RSA 2048 private key and Bob has corresponding public key. They have a secure connection, but Alice can transmit only 256bit to Bob (Bob can transmit any amount of data to Alice). Is there a way how Alice can proof to Bob that she is in possession of the private key?
This is a two part question - and I'm asking as someone moving into a security role, who'll need to standardize practices going forward. (1) I'm curious whether the following 10 different DH Groups are the only groups that TLS 1.3 supports, (2) and as such, are they the only ones that we should be using? https://www.rf...
I am exploring TLS, mainly from the server side at the moment. I am creating a server that will authenticate a client using TLS 1.3 and eventually I will be creating a client authenticating to a server. It is not intended for production, but merely for learning. I am having a few question regarding the hashes, from wha...