instruction
stringlengths
32
27.2k
Previously, I used AES CBC 256 with 256 bit key and 128 bit IV. However it seems slow so I decide to switch to AES GCM 256 bit key, 96 bit IV which has some parts I don't understand such as: Auth tag: the output of AES GCM when encrypting and decrypting needs it Can I prepend it to the encrypted cipher text so it's in...
TL;DR Does hashing a private key, then XOR[ing] the digest (twice recursively, with offset) on the secret have any glaring issues? Is partial digest recognition possible? Description User provides a private key 16+ chars User provides a secret < 128 chars (for now) We compute a digest of sha512(privateKey) Scramble di...
if I use an one time pad key generated using a cryptographically secure random source like python's secret module , to encrypt a message, will the one time pad scheme be secure? I think the entire security of one time pad scheme will depend on cryptographically secure random source, since such randomness is already use...
Consider this question. Say I would want to do something similar for $E_2:y^2=x^3−x+1$ over $\mathbb{F}_{3^m}$. How would I proceed?
What happens if you encrypt data with a good cypher that produces a cyphertext that looks random (say, AES but avoiding ECB mode), and then apply a Vigenere cypher to the encrypted random-looking data? Encrypt data so it looks random (for example with AES-CBC) Choose a long random binary key for Vigenere (for example:...
Context: paper on pairing based cryptography, question 1, question 2. Let $E: y^2 = x^3+x$ be an elliptic curve over $\mathbb{F}_{q}$ where $q=3^m$ for some $m\geq 1$. Then I know that $$ \# E(\mathbb{F}_{q}) = \left\{ \begin{array}{ll}q+1 - 2\sqrt{q} & m\equiv 0 \mod 4\\ q+1 &m\equiv \pm1 \mod 4\\ q+...
I am trying to use argon2 hash to derive secret key to be used for AES-GCM , in package argon2-cffi in python there is a function argon2.low_level.hash_secret_raw(secret: bytes, salt: bytes, time_cost: int, memory_cost: int, parallelism: int, hash_len: int, type: argon2.low_level.Type, version: int = 19) → bytes¶ , I r...
currently I am using parameters for argon2ID in terms of timecost , memorycost , parallelism higher than what is recommended in RFC9106 https://www.rfc-editor.org/rfc/rfc9106.html for increased security, the parameters i use are :- Timecost=12 Memorycost=2097152 parallelism=4 will this result in increased security or r...
The article Ligero++ (https://dl.acm.org/doi/pdf/10.1145/3372297.3417893) says "The number of constraints in R1CS maps to the number of multiplication gates in arithmetic circuits." But I understand the basic way to map an arithmetic circuit to R1CS will also map additions as constraints as shown in Vitalik Buterin's b...
Here the encryption is done as follows : $$C=P^e \textrm{mod} \, n =(P_1||P_2)^e \textrm{mod} \, n.$$ Here's my scenario that the adversary with CCA2 wins. The adversary chooses $X_1, X_2$ of the same size with $P_1, P_2$ and multiplies $C'=(X_1||X_2)^e \textrm{mod} \, n$ by $C$ to get $CC'=(P_1X_1||P_2X_2)^e \textrm{...
This is a well-known exercise that has already even been posted here. I understand both arguments to prove and disprove that $F'$ and $\bar{F}$ are PRFs, as I explain below, however, it seems that the proof also applies to the case where $\bar{F}$ is not a PRF! Assume $F$ is a PRF, then we have to prove that each of t...
It is argued that the Vigenere cipher is easy to break using the Babbage's solution. But this solution counts on finding the repetetive occurences of letter groups(words if you will). What if my key is thousand letters long. Wouldn't it then be very unlikely that the same word gets ciphered with the same portion of the...
I'm familiar with the concept of batching in the context of (Fully) Homomorphic Encryption - whereby many values can be encrypted as a single ciphertext and operated on simultaneously in an SIMD/vector-processing like manner. Is it possible to utilise batching with any of the Partial Homomorphic Encryption schemes (suc...
I recently got doubtful to the usefulness of psuedorandom generators(PRG) in cryptography. Based on Kereckhoff's principle, we always assume that the used algorithms are made public. So, when we use a PRG to generate a long key from a short key, we are broadcasting the PRG algorithm too. When we use the output of a PRG...
I am trying to check if some compressed public key corresponds to an elliptic curve equation (secp256r1). As far as I know it should be valid once the following equation is fulfill y^2 = x^3 + ax + b or y^2 % p = (x^3 +ax +b) % p. Supposing that I have the following key: pubkey = 027d550bc2384fd76a47b8b0871165395e4e4d5...
We are trying to generate some self-signed certificates to test our cybersecurity firmware before switching to a "real" CA-signed chain of trust. The specification we are coding to mandates that the keys are to use ED25519 and the certificates are to be signed with EDCSA-with-SHA256. We are working with OpenSSL 1.1.1q ...
I read through RFC5869 and I didn't see any recommended or required octet length of the IKM used in the HKDF-Extract operation. Is there any relationship between the Hash method used in the HKDF-Expand operation and the IKM length? e.g. when using SHA-256 this requires the IKM to be a 256-bit key.
I'm building a project using libsodium's AEAD + Key Exchange system and want to write a proof justifying the security of the project. I am wondering if I can find a source detailing the exact security definition libsodium's Key Exchange system satisfies. I know the textbook definition of IND-CCA2 and that AEAD satisfie...
I want to use cryptographic function that returns the initial input or something related to it like its hash, the function should work like Encrypting some data or its hash, then encrypt the output of the data, and encrypt it again another time, and the loop continue to specific number of iterations and finally it can ...
I am having a 32 byte shared secret from a KEM , I want to use AES-GCM for encrypting messages in this process random iv has to be created , can I use this iv as salt for hkdf-sha256 to generate more keys, will this be secure? I will create 2 keys one for AES-GCM and another for HMAC-256
I already have experience with quantum computing and the mathematics behind it. I also know the quantum cryptography side e.g. BB84, etc. I now want to move on to post-quantum cryptography and am therefore looking for suitable sources. Favored here is primary literature in the form of books, however there doesn't seem ...
I am wondering how secure it is to share digital signatures with a 3rd party (signed using one private key). For example, let's say I'm signing a million different messages with my private key and send to a 3rd party. How likely is it that this 3rd party can reverse-engineer my private key simply because they have a mi...
Suppose I know an RSA public key $(n,e)$ and I create two ciphertexts: An RSA ciphertext $C_1 = m^e \mod n$ and a Paillier ciphertext $C_2 = g^m \cdot r^n \mod n^2$. Is there a known efficient method to prove in zero knowledge that the two plaintexts are equal $\mod n$?
since digest size of sha512 is 512 bits or 64 bytes , is it safe to use values lower than 64 bytes as input to hkdf? I learned than hkdf uses hmac internally and input for hmac-512 is recommended to be equal to digest size that is 64 bytes.
It is known that Multiplicaiton Triple (MT) can be used for secure online multiplication, which is defined by $\mathsf{Mul}(x, y)=(z_0, z_1)$, where $x\cdot y = z_0 + z_1$ $P_0$ sample random $a$, and $P_1$ sample random $b$ By running the MT protocol, party $P_i$ gets $(a_i, b_i, c_i)$, where $i\in\{0,1\}$ and $(a_0 ...
Hi newbie here is there any minimum length for salt and info passed to hkdf based key derivation or is using 32 byte randomly generated bits for salt and info can be used for all hkdf
I read from Is GCM mode of authenticated encryption quantum secure? that AES-GCM will be insecure if the attacker is allowed to perform entangled queries on your GCM implementation, and return entangled responses, then, no, GCM is known not to be secure against this model; the attacker can use Grover's algorithm on the...
I'm trying to predict the next output of random numbers (bounded from 0 to 32) generated by the java.util.Random class. The code is shown below: Random random = new Random(); int first = random.nextInt(32); int second = random.nextInt(32); int third = random.nextInt(32); I know that Java's Random class uses a LCG with...
I have 16 byte shared secret , I am using HKDF-SHA256 to derive 2 ,32 byte keys , one for encryption aes256-gcm and another hmac-256 , the salt info used for HKDF are sent publicly along with the encrypted message will it be a problem if an attacker tampers these values. is there anyway to detect tampering.
Say a Human is operating their trusted computer, Alice, and Human wants to hand copy a collision resistant commitment, with a security factor of 128 from Bob on to paper. Naturally we want the commitment written by Human to be of least entropy possible to reduce the chance for human error and carpal tunnel syndrome. To...
It is well known that Grover's algorithm can solve AES in $O(\sqrt{n})$ time, which is why symmetric key length needs to be double to maintain their security level in the face of a quantum adversary. A recent eprint paper claims there exists a polylog time attack on AES (or searching unsorted sets in general) using a ...
I am using a PQ-KEM to get a 32 byte shared secret. I want to derive 2 keys , 1 for encryption of message using AES-CTR and another for HMAC-512. can I safely ignore salt and info parameter in hkdf-sha512 as they are marked optional? I want to skip salt parameter because in https://datatracker.ietf.org/doc/html/rfc5869...
I​ fail to understand what block ciphers can do that stream ciphers cannot. Also aren't they construct able from one another. prg(stream cipher) -> prf -> prp(block cipher) Any practical example would be very helpful
Suppose having an arbitrary $GF(2^n)$ element $x$. Its distribution is unknown. The task is to derive two $GF(2^n)$ elements $y$ and $z$, that have uniform distribution and are independent from each other. Let $x$ be known to a possible adversary. The obvious solutions are: Use some KDF, but it takes a lot of time to ...
Suppose I have $k$ blocks $B_i$ each consisting of $n$ bits. For erasure code purposes I'd like to be able to produce a computationally binding deterministic hash/fingerprint/digest $H$ such that $\mathrm{verify(x, H)}$ succeeds if $x$ is an additive combination of arbitrary $B_i$ (in $GF(2^n)$), and if not it succeeds...
My computer generates a 65536-bit RSA keypair in 106 minutes. Is there a way to generate them faster by some trade-off? Can they be created in bulk, so long as they're able to encrypt and decrypt? Is it possible to generate large RSA keys quickly, for example by allowing the keys to be weak? Are RSA keypairs proof of w...
With regard to LPN over non-binary fields like $\mathbb{F}_3,\mathbb{F}_5,\cdots$, are there any studies about that ? We also would like to know any articles that have a formal definition of the non-binary LPN. We know large amount of the binary LPN studies, but why is the non-binary LPN rarely studied ? We referred to...
I recently read a StackOverflow post about a CS(P)RNG generating sixteen bytes of random data. The OP wanted this data to be random and unique. One of the answers said that uniqueness and randomness are mutually exclusive when talking about a CS(P)RNG. I commented on that matter with the following example: The list [1...
I'm a bit confused by the standards and some replies regarding zero (the point at infinity) in elliptic curves ElGamal. TL;DR: Why do some people recommend excluding zero? It has nothing to do with key leakage due to insufficient order as those attacks are preventable by group membership checks (i.e. not related to zer...
The motivation for key aggregation multisig and threshold schemes (e.g. MuSig(2), FROST etc) in Bitcoin is obvious. Signatures are a large part of every transaction, all the nodes on the network are attempting to verify every signature and signatures in many cases have to be stored as part of the blockchain data struct...
I read: What are the differences between a digital signature, a MAC and a hash? and Found this amazing answer: https://crypto.stackexchange.com/a/5647 But one question remains: I know that for huge input Hash's Output is much smaller, SIG's Output is of same size, but what about MAC's Output? If MAC's Output is of same...
I'm trying to digest the "new hope" paper on post-quanum key exchange and understanding parts of Ring Learning with Errors, despite using every online resource I can find (including the references of 1). I'm sure regular Learning with Errors made some sense to me. So let's start by with sampling. If you define a polyno...
In the accepted answer to a question in Computer Science Stack Exchange, it was mentioned that a block cipher in counter mode makes a random number generator with a large bitspace, which visits every element of the domain exactly once before cycling. Of course, with usual block cipher block sizes (of 128 bits and more)...
I already asked a question about the feasibility of LWE when the matrix A is sparse or small here. Let $q$ be a prime, let $\chi$ be a distribution of $\textit{small}$ elements over $\mathbb{Z}/q$, and let $n,m$ be two integers (dimensions of vectors that we work with). Sample $s \leftarrow \chi^n$, $e \leftarrow \chi...
I was looking into the opaque authentication protocol and they discuss an oracle, which, if I understand it correctly is a projection $Z$ from $f$ to $g$ ($g$ at least the size of $f$), which maps inputs from $f$ to $g$. If $f$ and $g$ are the same, is this not comparable to an encryption with a substitution cipher of ...
I have been doing some research into recursive SNARKs. But I haven't found a working code example such as this one using Zokrates or this one using snarkjs. Anyone knows one such example, say, for proving a hash chain? Recursive STARK example is also fine.
I'm going through the datasheet for MifareDesfire ICs. Throughout the document, there are mentions of "key version". For example, section 9.3 of the document states: Hardware AES using 128-bit keys featuring key version, data authenticity by 8 byte CMAC I'm unclear on what "key version" refers to within this context...
The famous result of Goldreich, Goldwasser, and Micali (GGM) constructs a PRF $F$ from a PRG $G$: F(k,x): v := k for i = 1 to length(x): if x[i] == 0 then v := left half of G(v) if x[i] == 1 then v := right half of G(v) return v ($G$ is a PRG with outputs twice as long as inputs) This PRF cal...
Are there any ciphers that are provably secure (reducable to a hard problem (including like factorization, not necessarily to NP-Complete or harder) ) are practical (not necessarily for too much bulk action like videos, but for small text messages, by humans) with decent security ~ 2^100 notes: blum-blum shub seems...
Suppose we are trying to construct a cryptographic scheme, say public key encryption, and I can prove the IND-CPA security of the PKE scheme when any adversaries perform at least $T$ queries. That is, our proof only holds when the number of ciphertexts allowed by an adversary is bigger than at least $T$. In other words...
i am new to cryptography , i am using article https://medium.com/asecuritysite-when-bob-met-alice/hmac-and-hkdf-df4e194752d1 for reference , while using salt with hkdf to derive multiple keys from a single key for encrypt then mac scheme is it safe if i hard code the random salt value within my program . i will use pa...
I am trying to find a way to mine bitcoin faster than an ASIC by using a CNF representation of sha(sha(hash)), which would be an equation containing a few hundred thousand clauses, let's call it n clauses. If I brute-force guess and check solutions, what is the fastest way to check if a given solution satisfies the equ...
I have doubt like when in the IPsec we use a DH group for key exchange. It takes a prime number and $g$ value from group bit. How does the key exchange payload and nonce help to generate the shared secret in the he message 3 & 4 exchange?
Practical implementations of digital signature algorithms (DSAs) employ hash functions to ensure that input is small and of a fixed sized; otherwise, DSAs would be too slow for most real-world applications. Given that hash functions map arbitrarily long inputs to (smaller) fixed sized outputs, you may have several inpu...
I know I am not supposed to ask for answers, which I am not. I have the solution but I don't understand how 'e' is selected, pls see my explanation below. I am doing practice questions for my Cyber Security Paper. One of the question I came across is: "Using RSA Technology, Alice wants to send Bob the number 10. Alice ...
In the paper about ABE (like this), the access structure is defined as follow: Let ${P_1,P_2,...,P_n}$ be a set of parties. A collection $A⊆2^{\{P_1,P_2,...,P_n\}}$ is monotone if $∀B,C$: if $B∈A$ and $B⊆C$ then $C∈A$ ... What is the meaning of this notation: $2^{\{P_1,P_2,...,P_n\}}$? Can you give some example while...
I designed a simple library (golang) for use as session token for web applications. The idea is simple: the token will be 16-byte long, denote it as t generate a random byte m, put it into t[0] encode the expiration timestamp as a big endian uint64, append the lower 48-bit of it into t. append the big endian represen...
Consider secure two-party computation against malicious adversaries in the standalone model. I know that the "rewinding" technique can be used to extract the corrupt party's input, e.g., in $\Sigma$-protocol or interactive commitment. I am curious about whether this technique can be generally applied to secure computat...
Let $\mathbb{F}_q$ be a large finite field. What if I invent how to efficiently construct pairs of elliptic "cryptographically strong" $\mathbb{F}_q$-curves $E_1$, $E_2$ isogenous over $\mathbb{F}_q$, that is $\#E_1(\mathbb{F}_q) = \#E_2(\mathbb{F}_q)$, in such a way that nobody (including me) knows an $\mathbb{F}_q$-i...
Given an hash H that is not collision resistant, for example 80-bit digest, if we use the following double hashing scheme: H(SHA2-256(x)). Does this scheme increase the collision resistance?
The XOR operation is an important part of most of the existing end-to-end authentication protocols. Will it be part of the post-quantum authentication protocols?.
How can $n$ peers compute $$\frac{1 + a_1 \times \dots \times a_n}{b_1 \times \dots \times b_n}$$ such that the pair of values $a_i$ and $b_i$ remains secret to the $i$-th peer?
I came across DES-EDE3-CBC and a quick search didn't yield a clear explanation of what it is. Clearly, DES is the Data Encryption Standard and CBC is the Cipher Block Chaining mode. EDE is probably Encrypt-Decrypt-Encrypt and maybe the 3 means that 3 distinct keys are used? It's somewhat mentioned in this question but ...
Bleichenbacher’s ’06 RSA signature forgery targets incorrect PKCS1 v1.5 implementations where padding checks are omitted and RSA keys with e = 3 are used. As per the answer to a related question, the attack has the following additional assumption … with the assumption that the lsbit of the hash is a 1 (or more gener...
I want to create a SHA256 hasher in Circom so I can validate that a person knows the pre-image of a SHA256 hash without revealing the pre-image. This is my current code but it doesn't work: include "/node_modules/circomlib/circuits/sha256/sha256.circom" template SHAHasher(nBits) { signal input bits[nBits]; signal ...
Are real-or-random(rr) model and LR-model are equivalent? In the definition of ciphertext indistinguishability, LR-model is used. However I think rr model and LR model are somewhat equivalent. Here is what I really want to know: When proving some cryptosystem(ex. ElGamal under DDH) are IND-CPA secure, can we just use r...
What are the possible assumptions that have been used or can be used for designing the homomorphic Collision Resistant Hash function (CRHF)? I know Short Integer Solution (SIS) is one of the assumptions used for designing homomorphic CRHF.
As far as understand AES takes 16 bytes, shuffles them and replaces every of the 256 bits via XOR. Then the same procedure applies to the next 16 bytes, and then again - until the entire file is encrypted. What if I just randomly shuffle numbers from 0 to 15, and also randomly write zeros and ones, 256 in total, and t...
I am reading about the Ring signature. However, I do not understand the verification process of this signature. Could you provide me a complete numerical example showing the signature creation and verification process? In case of RSA, there are many numerical example are available but I have found none for Ring Signatu...
NIST SP800-56C r2 added Section 5.3 which specifically addresses using a single Extract step followed by m Expand steps using the same key-derivation-key produced in the Extract step. This is a very common widely-deployed scenario (ex. processing master-key in Extract, then generating multiple derived keys with Expand...
I have seen different protocols in field or ring, I used to think ring is a special field when 2^k. But when I read the paper later, I doubted my understanding.
I have read SPDZ family protocol, the domain of the spdz_1 in 2012 is $\mathbb F_{p^k}$. Later mascot'16 supports both $\mathbb F_p$ and $\mathbb F_{2^k}$, where $p=2^k+u$. I want to know the difference between the protocol in $\mathbb F_p$ and in $\mathbb F_{2^k}$. The reason maybe that spdz_1 use SHE, which only supp...
Context I am implementing LSAG in python because I do not find a non-obviously insecure implementation. I am not a cryptographer myself, thus simplicity is key. The famous Linkable Spontaneous Anonymous Group Signature for Ad Hoc Groups paper states these algorithm parameters: Parameters: group G of prime order q hash...
I am currently working on password manager. So far I used one encrypted database file to store all the passwords and then decrypted it at runtime with a derived user-entered master password. All log-in data was then loaded into memory to present it in a user interface: I am searching for a more secure way to especiall...
I'm currently working on a webapp in which I'd like all nearly all user data to be encrypted, but accessible by multiple users (ie a doc encrypted should be decrypt-able by parties A, B, C, all independently). Is there any way to achieve this? One issue I realized is that it would be nearly impossible based on my knowl...
Given an encrypted (RSA) message and it's original plain text, is there a way to prove that the plain text belongs to the encrypted message ?
Wouter Castryck and Thomas Decru recently broke SIDH. From the abstract: We present an efficient key recovery attack on the Supersingular Isogeny Diffie-Hellman protocol (SIDH), based on a "glue-and-split" theorem due to Kani. The referenced Kani work is: Ernst Kani, The number of curves of genus two with elliptic di...
Is there a way to encrypt a file with 2 (or more) keys and then access it with only 1? Scenario: Bob and Alice have a tight memory and can only remember ONE key. Bob and Alice encrypt a file with their keys. Bob goes in coma and Alice wants to access the file, but has only one key. Is there an algorithm that solves t...
I'm mainly trying to verify large file chunks which are encrypted each alone with a different key/salt/nonce for each chunk then appended to the whole file in the end to form 1 file. One thing I wanted to implement was the principle of not outputting plain data of any chunk to the user unless every chunk of the file au...
I am trying to make a byte-serial implementation of the AES 128-Bit in ECB-mode for my studies. I understand the "normal" (word-parallel) implementation of AES and the way of Eli Biham (bit-serial). Both extremes of the representation variants, namely bit-serial and word-parallel, were examined, but what is about byte-...
According to this webpage: The process of encoding a private key into WIF format is as follows. Raw private keys are simply large numbers, which are represented as bytes. WIF format adds a prefix byte (0x80 for mainnet and 0xef for testnet) so that almost all Bitcoin private keys begin with ‘5’ or a ‘K’ on mainnet. Ne...
What would be a way to prove that both you and I know the same dictionary word? If we both hashed the word, then we could compare the hashes, but anyone who saw the hash could find the original word by hashing all the words in the dictionary. What would be a better way?
Avalanche is one of the characteristics of S-Box or SP network(S and P boxes are used together).Is it possible for the permutation module, when tested alone, to show avalanche effect.? reference SP network in block ciphers
For generator point $G$ in the secp256k1 curve, I want to find a value $k$ such that: $$h\equiv(k\,G)_X\,(k-d)\pmod n$$ where $n$ is the group order, and $(k\,G)_X$ indicates the x-coordinate (mod n) of the resulting point after the multiplication by $k$. Assume $h$ and $d$ are fixed scalar values that I've been given....
HKDF-Extract is defined in RFC 5869 as HKDF-Extract(salt, IKM) -> PRK Options: Hash a hash function; HashLen denotes the length of the hash function output in octets Inputs: salt optional salt value (a non-secret random value); if not provided, it is set to a ...
In RSA, signing the hash of a message is doing the operation $h^{d} \bmod N$ where $d$ is the private key. Given that the size of $d$ is usually 2048 bits and $h$ is a quite big number, the exponentiation will take too much time. For example in python raising a number of 9 digits to the power of a number of 8 digits to...
I am currently studying and implementing ECC algorithms but I encountered a problem. I want to use Secp521r1 for generating a shared key and encrypting with ECIES using AES256 but AES-256 requires a 256-bit key while the shared key is 521-bits. How can I use a 521-bit shared key for encrypting with ECIES AES-256? Shoul...
I am new to Oblivious Transfer (OT) and am having trouble finding a definitive answer regarding if/when/how baseOTs can be reused in a computation when using OT-extension (for passive security only). Say two parties are running a secure function evaluation (SFE) protocol and need to use multiple rounds of oblivious tra...
I am new to ECC but I was wondering, If there is a situation where instead of the ciphertext being falsified, the sent MAC was tampered. How does the receiver verify that the ciphertext is still correct? How can the receiver verify that only MAC is tampered with? How is it possible to know whether the sent MAC or Ciphe...
In [1], the authors state: [...] observe that unlike [32] the initial OT phase in Protocol 52 is completely independent of the actual inputs of the parties. Thus, the parties can perform the initial OT phase before their inputs are determined. where “initial OT phase” refers to the base OT phase. In a follow-up/exten...
I've been trying to learn about attacks on LPN ($n$-bit secret, noise rate $\eta$), and have found several allusions to a brute force algorithm that runs in time exponential in $n$ and requires a linear number of samples in $n$. For example, the third slide of this deck or the original BKW paper. That said, I have not...
Given a plaintext of length 20 over the latin alphabet {A, B, . . . , Z} and the RSA key (n, e) with n = 77. Find a way to break up the plaintext into as little as possible blocks of information, each of which can be encrypted by the RSA algorithm using the given key. My question is, What are the possibilities for a p...
I am creating an internal application that will be used to generate and manage self-signed certificates and certificate authorities. Its primary use will be for generating certificates used in SSL decryption by my clients' firewalls. My goal is to have a deterministic RNG that could be fed into either RSA key generatio...
Let's say we have a certain amount of LSB bits of P and Q and we want to fully reconstruct them given N=P*Q. I know this problem was studied in literature by Coppersmith and that Lattice methods are pretty efficient but I would like a numerical / sagemath code example. If we have for example N=23767*17191=408578497 and...
Given a CSPRNG (arc4random, using ChaCha20 keystream), one want to use rejection sampling to get random number on a smaller range avoiding modulo bias (arc4random_uniform()). OpenBSD's arc4random_uniform() implementation draws a 32bits value and tests its fitness, rejecting values that don't fit. It's not the only poss...
I am learning about stream ciphers, which apparently are unpopular. I just want to have a better idea of some basic algorithms that are in use or were in use till recently. I checked: the OTP: Apparently great but unpractical Linear Congruent Generator: insecure LFSR: not sure yet but it appears insecure Can you sugg...
Background: In Wikipedia (bilinear map definition), a condition listed as the following: For any $\lambda \in F, {\displaystyle B(\lambda v,w)=B(v,\lambda w)=\lambda B(v,w)}$ In a math.stackexchange post, i saw this comment: which defines bilinearity in the same way as the Wikipedia link. So I assume, the above defini...
As far as I understand it, TLS creates a tunnel or channel or secure connection between the parties right? Where everything is protected? But hypothetically if the network gets breached, would the raw data/message sent from one client to another through a central server be readable? If someone gets inside the tunnel so...
A vector commitment scheme is a scheme (dough!) that allows a prover to prove that $v_i$ is a component of a vector $v$ without revealing any other information about $v$ . (So the prover commits to $v$ and then proves that $v_i$ is one of it's components). To the best of my knowledge, current vector commitment schemes ...
Which algorithm is more crypto-resistant: AES or Kuznechik (GOST R 34.12-2015)?