instruction
stringlengths
33
27.2k
I need some clarification on the discrete logarithm problem... When a friend and I were solving for the discrete logarithm problem of 9 = 2 ^ x mod 11, we got two different answers. My initial answer was 6 for x. But his answer was 12 for x. So we decided to cross check our answers and indeed we were very correct. So w...
Assume the zero knowledge protocol where the prover knows a $x$ such that: $g^x = h \pmod{p}$. The prover chooses a random $t \in \mathbb{Z}^*_m$ and sends $y = g^t \pmod{p}$ The verifier sends random $c \in \mathbb{Z}^*_m$ and sends it The prover calculates $s = t + c + x$ and sends it The verifier accepts if and onl...
What is a simple explanation for the difference in terms of key gen, encryption and decryption between the original NTRU (HPS98) and the NTRU candidates submitted in NIST PQ Standardisation? Round 1 - NTRU Encrypt, NTRU-HRSS-KEM, NTRU Prime Round 2 - NTRU (Merger of NTRU Encrypt and NTRU-HRSS-KEM), NTRU Prime For examp...
While discussing proving a language in $\Sigma_2$ from a client to a server with a friend we realized that while we know that such a language is provable in zero-knowledge, we didn't know whether it was provable in non-interactive zero-knowledge. This then led us to find this answer which states it is sufficient for a ...
Could someone please provide the math proof; $$ ((g^a)\bmod p)^b \bmod p = ((g^b)\bmod p)^a \bmod p $$
Coming from the Wikipedia page on RSA, I think I understand the following: RSA is based on generating an integer $n$ as the product of two large primes, $p$ and $q$, and encryption/decryption exponents $e$ and $d$ such that for any given plaintext $m$, $$(m^e)^d \equiv (m^d)^e \equiv m^{ed} \equiv m \mod n\,,$$ i.e. su...
Recently I found the sagecipher project, which uses ssh-agent's signing operation as a way to produce a symmetric key and encrypt data with it. It appears to work with ssh-ed25519 keys, but my question is: Is this guaranteed to work? That is, are signatures always deterministic with the key and signature algorithms sup...
I am implementing the Schnorr Protocol in python and am having reliability issues when using some curves. I am wondering if this is an issue with my logic, or some implementation issue. I am using ECPy version 0.8 to implement a Schnorr Signature. Terminology and notes: Public keys are called ZKSignature and are publi...
I'm currently writing a report for my Master's degree on the SSH protocol. Quite interesting! However I'm having trouble getting into the inner workings of the host key algorithms. For example, according to RFC4253, "ssh-rsa" is a key format where the server generates an RSA keypair. So far, so good. However, I don't s...
In NTRU (N,p,q,d), N is usually chosen to be prime and q be a power of 2. Why is it that if I increase the parameter q, the probability of finding a key or spurious key that can decrypt the message is much higher? For example, N=127, q=256 will give me an unsuccessful lattice attack but N=127, q=2^16 will give me a suc...
Prove that the function $$ G(z) = \mathcal{H}(z) \, || \, \text{LSB}(z) $$ (where $\mathcal{H}$ is a collision resistant hash function, $||$ is concatenation and $\text{LBS}$ is the least significant bit of $z$) is not preimage resistant. Obviously, if $z = 0^n$ then from the output $G(z)$, one can extract $z$ from the...
I have a CAN bus project and I should encrypt the communication between nodes using the AES algorithm. Which encryption mode should I use?
Can we build two messages with same MD5 but different size? I researched MD5 collisions, but everything I found targets messages of the same size.
I am reading Practical Cryptography in Python. I have problem understanding the common_modulus_decrypt() function. I think the prerequisite of RSA Common Modulus Attack is that two public exponents have to be co-prime, meaning $gcd(e_1,e_2)=1$, right? That is what I get from how to use common modulus attack? If this i...
is it possible to generate set of child private keys from one parent private key, generated by ECC for example, securely? So that new private key (and derive public key) could be used for encryption or signing/verification? The process of generation of a new private key could be relatively slow (up to a few seconds),...
According to Katz Lindell book, Let Dist be a distribution on l-bit strings. Informally, Dist is pseudorandom if the experiment in which a string is sampled from Dist is indistinguishable from the experiment in which a uniform string of length l is sampled. (Strictly speaking, since we are in an asymptotic setting we ...
I recently studied the LPN problem and BKW algorithm for solving LPN problem. Several papers deal with the concrete parameters of LPN to be secure against BKW algorithm, but I cannot measure the concrete complexity of BKW algorithm. The papers provided the concrete parameters when the memory space is bounded by $2^{60}...
I am trying to realize a secure file sharing scheme based on asymmetric crypto. Users will access this via browser. In short, it works like this: Users register and set their username and password. From this password, a public/private key pair is deterministically generated and the pk is published to the server. Once ...
I have $N=p\cdot q$ and the following system where I know $A,B,C,D, k$: $$A = B \cdot q^k \pmod N$$ and $$C = D \cdot p^k \pmod N$$ Is there an easy way to recover $p$ and $q$?
There are multi-key attacks against some AEADs. In other words, multiple keys can be used to decrypt a message since multiple keys can be valid for an authentication tag. How would one go about adding key commitment to an AEAD like AES-GCM or ChaCha20-Poly1305? The three ways mentioned by libsodium are: Key identifier...
On the Wikipedia page of SHA-2, the following is written: Currently, the best public attacks break preimage resistance for 52 out of 64 rounds of SHA-256 or 57 out of 80 rounds of SHA-512, and collision resistance for 46 out of 64 rounds of SHA-256. Can someone explain in simple terms what that means? Also, for SHA-1...
I know of a project that implemented e2e encryption using both authenticated encryption and public key signing. So the ciphertext produced for a message would be: ciphertext = signature_Ed25519 + nonce + mac_Poly1305 + XSalsa20(plaintext) I struggle to understand what the benefits of doing both could be, as MAC is alr...
In an interesting paper called "Partitioning Oracle Attacks" by Julia Len, Paul Grubbs & Thomas Ristenpart an attack is presented on 1.5 pass AEAD schemes that utilize GMAC (GCM, AES-GCM, AES-GCM-SIV) and Poly1305 which is often used with a ChaCha/Salsa variant. In the paper they mention that older schemes based on HMA...
I recently came across a mention of invalid key share attacks on this site. It is done with DH groups over $\mathbb{ℤ}_p$ :prime $p$, where $p = qh + 1$, where $q$ is the prime order of DH subgroup used, which can reveal $s$ s.t. $s \equiv x \bmod t$, given public key $X = g^x$, $x$ being a DH private key and $g$ being...
I read that XMSS generates many private keys and one key must sign only one message. Does it mean though that I sign many different messages, or do I sign one message, which, if its longer than 256bit, will be split into two parts and the 2nd part will be signed with the 2nd private key? Is the signature only meant to ...
If I have 4 kilobytes of Paillier encrypted data, how can I know the time needed to decrypt it?
I'm trying to understand how secure XChaCha20 is in comparison with other ciphers. From what I know, ChaCha is more secure than AES, but less secure than Serpent. My question is how much more "secure" is ChaCha than AES and how much less secure it is than Serpent. If (on a scale of 1 to 10) AES is 5 and Serpent is 10, ...
This is from Dan Boneh's Coursera Lectures - Week 6 - Constructions. https://www.coursera.org/learn/crypto/lecture/nTRhL/constructions Here he picks a random x from X. And then Hashes X to get the session key k from K k = H(x). Why not just pick a random k from K instead of first picking x from X & then hashing it to ...
Given an elliptic curve $E$ over a finite field q(q is a prime), and $<G>$, the cyclic subgroup of $E$, where G is the generator. Is there any trapdoor $T$, that given a random group element $P\in E$, we can decide if $P\in <G>$ in probabilistic polynomial time with the help of $T$?
I am reading the Wikipedia article https://en.wikipedia.org/wiki/Homomorphic_encryption and it lists unpadded RSA, ElGamal, Goldwasser-Micali, Benaloh, Paillier as possible partially homomorphic encryption (PHE) schemes. Of these, only Goldwasser-Micali seems to be for bits and it is XOR-homomorphic. The other encrypti...
I'm thinking about the evaluation of a cipher or separate cipher round as a PRNG. In general, we can encrypt consecutive natural numbers and check them with some randomness test. But PRNGs don't work like this. They use their output like a new input. Shouldn't it be like that the ciphers should have long periods in suc...
I've recently had a situation in which a recommendation for an easy-to-use, hard-to-misuse cryptographic library for Java was required. The first choice was Google's Tink, since it was designed specifically for that purpose. Given it's association with Google, the customer was not too thrilled and asked for alternative...
The length of WOTS+ private key is an array of length "len" of n-Byte strings. Meaning, for w=16 and n=32, the len is 72. So the WOTS+ max length of the private key is 72, meaning only 72 messages can be signed. Now my problem is, when you read about XMSS Keys, it says that the private key is defined by 2^h OTS private...
The main confusion I have is around the different PKCS and relation with SSL (TLS). I have done a lot of research and have found bits and pieces but not necessarily how these relate, so let me explain but first with a little background. To start, I am fairly comfortable with how SSL (and subsequently TLS) works, and su...
For what purpose it is not right to use a bit sequence of 2000+ zeros followed by one byte in Keccak? Is there a possible application of such input for Keccak? If yes, after which transformation?
Would this encryption and signing scenario be considered tamper-proof? plaintext = "hello world" password = "secret key" hash = sha3_512(plaintext) ciphertext = encrypt(plaintext,password) output = ciphertext+hash I'm computing the hash of the plaintext and then adding it to the end of the ciphertext output. I know th...
I'm pretty new in crypto, and studying RSA now. I saw few videos and read about it and how it works. So basically, after we have the modulus N and exponent, we encrypt a message with: m^e mod N = Cipher and then decrypt that cipher with d My question is that, seemingly, we can have multiple values for m that would yi...
I'm working on one of those unsolved puzzles, and one theory I have is that one or more sections of it are using digits of pi, e, or some other irrational number as a one-time pad. (The obvious approach would just be to try well-known irrational numbers, but I've tried that without success and if it is that there must ...
Let's imagine one hash function that is based on 10 hash functions. For every input, it changes the order of the 10 hash functions. So, for example: Hello, World! -> md5 -> sha256 -> sha512 -> sha3_256 ... -> resulted hash -> sha256 (additionally) Hello, World? -> shake_256 -> md5 -> sha256 -> sha3_256 ... -> resulted ...
I'd like to have a small sanity check first: As far as I understand, diffie-hellman is all about that fact that, given the generator ($g$), the modulo ($n$) and the remainder ($c$), it's hard to find the exponent a in: $g^a \bmod n = c$ But the conditions for this are that n is a big prime number, and g is a root primi...
I'm fairly new to this stuff so be forgiving. I'm trying to learn how RSA works, My resources for the manner of sake: this video this wikipedia page This is what I got so far: since $m^{phi(n)} \equiv 1 \bmod n$ as long as $m$ coprimes to $n$. So eventually: $m^{k * phi(n)+1} \equiv m \bmod n$ Now we construct $e$ a...
There's a problem with digitally signed documents - in particular that any print-out of them will be only a copy, not an original (by print-out I mean the print-out of the human readable form of the document, not the sequence of bits that makes up that document). That makes it difficult for digital signatures on offici...
I just got back from an exam review and there was a question I remembered that I apparently got wrong. I wonder if someone could help me with this, since it bothers me. The question was something like that: Between a client and server, a symmetric encryption algorithm is used for the communication. The encrypted data i...
I have two primes and public exponent. How I can generate private key with this values and "ssh-rsa" format?
Some PQC schemes don't require collision resistance for their hash functions, thus using a hash function faster than the SHA series that only considers the pre-image and secondary pre-image resistance would speed up these schemes. Is there such a standard for hash functions that 1st and 2nd preimage resistant but not n...
I'm trying to figure out what is period of PCG generator XSL-RR-RR: https://www.pcg-random.org https://en.wikipedia.org/wiki/Permuted_congruential_generator If we use just random multiplier and increment in LCG in that PCG. M. O'Neill wrote: "For the PCG family, arbitrary k-dimensional equidistribution (and the huge pe...
I'm creating a substitution-permutation cipher (for learning purposes only of course) and I'd like to implement dynamic SBOXs. The cipher will have a block size of 128, and 32 rounds. These SBOXs will be generated from the password. Is the following procedure secure for generating secure SBOXs assuming that the key (32...
Ok so the inverse function of RSA encryption (that is decryption) is $ m \gets c^{d}\bmod N$ where $d$ is the secret exponent As I understand the hardness of RSA depends on two things: the Integer factorization problem and the discrete logarithm problem. While studying DH Key Exchange, it is a requirement that a safe p...
Is there any example of semi-direct product used in any of cryptographic application? Does it help in choosing integers p, q in RSA?
In code-based public key encryption schemes, a public key is formed by matrix-multiplying 2 linear matrices to the left and right side of a easily decodeable error-correcting code, so that it'll be difficult to extract useful information that may be used to decrypt ciphertexts. In multivariate digital signature schemes...
In a system I'm working with, we're using Schnorr signatures with scalars generated with libsodium's crypto_core_ed25519_scalar_random. My goal is to use the crypto_box_easy / crypto_box_open_easy routines where Alice and Bob each have their own Scalars / Points already previously generated with crypto_core_ed25519_sca...
From the website of GNU Privacy Guard (GnuPG): If an attacker could decrypt a session key it would only be useful for reading the one message encrypted with that session key. The attacker would have to start over and decrypt another session key in order to read any other message. From my understanding, if an attacker...
Does anyone know a good, well known implementation of ElGamal encryption and decryption in JavaScript? I was told that Stanford Javascript Crypto Library https://github.com/bitwiseshiftleft/sjcl/ uses ElGamal but I am not sure about it. Does anyone know if they use it? Thank you all in advance for your help.
Assume you want to calculate the blake2 hash function for an arbitrary input of $n$ bytes. I am wondering about the runtime, in particular: Does the runtime of scale linearly with the input length, i.e., can the runtime of blake2 be estimated as O(n)? Is the landau even something that is sensible here, given how optim...
Plaintext: "abcd" where P1,P2,P3,P4 map to each corresponding letter. And C is the ciphertext where C1,C2,C3,C4 map to each corresponding letter. Keys = (x,y,z) Can I use the following encryption algorithm? Is there a corresponding decryption algorithm? C1 = xP1 + P2 C2 = yP2 + zP3 C3 = P4 + zP3 C4 = xP3 + yP4 It doe...
I want to gain some experience with homomorphic encryption, specifically possible applications in social networks. I am thinking about using a HE library (such as Microsoft SEAL) with a graph database to simulate the scenario of a client encrypting their data in a social network. Do you have any ideas of possible real ...
Consider the following cryptosystem with plaintexts from the set $M$ and ciphertexts from the set $S$ with $M = S = \{0, 1\}^4$ . A plaintext $P = (P_1, P_2, P_3, P_4)$ is encrypted to a ciphertext $C = (C_1, C_2, C_3, C_4)$ as follows. $C_1 = (a P_1 + P_2) \pmod 2$ $C_2 = (b P_1 + c P_2) \pmod 2$ $C_3 = (d P_3 + e P_4...
In TLS 1.2, there was TLS-SRP (RFC 5054,) which provided a password-authenticated key exchange (PAKE) protocol for use with TLS. However, it apparently relied on handshake messages that have been removed from TLS 1.3 and, thus, is not applicable to TLS 1.3. TLS 1.3 does still support the PSK-DHE handshake, but it doesn...
My rudimentary understanding of HTTPS and the Diffie-Hellman key exchange is that the client and server can establish a secured connection by generating the same key based on their private secrets and shared secret. That key is then used to encrypt/decrypt the data being passed back and forth between the two parties. T...
I know that ECB is less secure than CBC, but will it be suitable for encrypting a long bit string?
I feel that my question might display a bit of ignorance. I have been searching for answers, but have had no luck--perhaps my assumptions are wrong. I apologize if that is the case. Context: I have a microcontroller communicating with a server. Every frame is signed using a private key from an RSA/SHA-256 public/priva...
First step in DH & ECDH is to choose a random prime $p$. Then you choose a generator $g$ for the group $\mathbb Z_p^*$. How do you find a generator? Likewise in ECDH, you would need to find a generator which generates all the points in the elliptic curve? How is this done?
Discussions of the weakness of the U.S. Data Encryption Standard frequently cite a letter by Martin Hellman and Whitfield Diffie to the National Bureau of Standards that reported stated: Whit Diffie and I have become concerned that the proposed data encryption standard, while probably secure against commercial assault...
In Section 2.2 of DJB's Polynomial Evaluation and Message Authentication, he describes the construction of the first provably secure authenticator, which was the work of Gilbert, MacWilliams, and Sloane. Fix a finite field $k$. The legitimate sender generates 9 independent uniform random secrets $r1, r2, . . . , r8, s...
Yao's theorem says that for a distribution, next bit unpredictability is equivalent to pseudo-randomness. This link proves Yao's theorem, but the proof relies on non-uniform probabilistic polynomial time algorithms. Is there a proof of Yao's theorem that instead only uses uniform probabilistic polynomial time algorithm...
NIST SP800-38D section 5.2.1.1 is clear that empty nonces are not allowed with GCM, but without explaining the reasoning. My assumption was this is simply because the probability of error (encrypting multiple messages with an empty nonce) would be to high in any system that supported empty nonces at all. As NIST does n...
The GSW one of the FHE scheme is widely used as a homomorphic commitment scheme to build lattice based ABE, homomorphic signatures and NIZK and so on. But I cannot find other FHE schemes to be considered as a commitment scheme such like that. Is there a special reason why GSW is only one scheme regarded as a commitment...
From this popular Crypto.SE thread, the general feeling is that Encrypt-Then-MAC is the most secure. From the first answer, the poster says that Encrypt-And-MAC provides integrity of the plaintext. If I'm transferring classified data between two parties, then this plaintext integrity should prevent malicious modificati...
I have a library which implements AES GCM algorithm. However, as you know even a single nonce reuse can have catastrophic results. As we can't guarantee a unique IV every time, I would like to run the SIV (Synthetic Initialization Vector) on the nonce every time. I want to implement the SIV outside of the AES GCM. As, ...
I want to estimate the cost of breaking file-based encryption in Android given a password entropy. The only information I found so far is this: The stretched credential is the user credential after salting and stretching with the scrypt algorithm. AFAIK, scrypt has several parameters. How do I know what parameters ar...
What is the correct way, if any, to do Multi-Prime DH? From security point of view, is there any benefit to do it? Multi-Prime is not about multi participants. Multi prime is when we use two or more prime numbers and multiply them to get the modulus part in DH. It is faster to find four 4096 bit safe primes and multipl...
I have a question, or rather multiple questions that all relate to the same topic. I am building an application with both a frontend (FE) and a backend (BE). All communication between FE and BE is protected with TLS. The BE contains an endpoint on which the frontend can register a new session. When setting up such a ne...
Samuel Neves in his reply mentioned a method by Coron and May's 2004 paper for deterministically reduce finding to factoring . As you all know, we are using $\lambda(n)$ everywhere now for RSA. So question is, does this work for $d$ generated with $\lambda(n)$? The paper seems referring to $\varphi(n)$ only. If it doe...
I know this has been asked before, but it's still unclear whether this is an OK practice. The advice seems to never do this unless you have to, but I can think of some examples where this could be useful. For example, a program that supports encryption and signing like GPG could support generating Ed25519 keys and then...
I have an idea for a simple cipher that builds on old techniques that I thought I would share with this group. It has probably been done but I have not been able to find a reference to it. Given two individuals who wish to encrypt their correspondence, brevity and a one time pad is pretty bullet proof. However there ...
Good Day. I'm sorry for my sage code, without formulas, but I looking your help friend. p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F F = FiniteField(p) E = EllipticCurve(F,[0,7]) print(E[0]) what mean E[0] ???? It very hard to calculate E[0], so, I'm looking for your help friends.
I'm new to zero-knowledge proof. Recently, I'm implementing a non-interactive zero-knowledge proof using the Schnorr scheme. I understand the non-interactive zero-knowledge proof needs random oracle for a prover to generate a proof along with a hash. Others suggested that I need to use Strong Fiat-Shamir to generate th...
I am struggling with a Diffie Hellman crypto challenge based on a client that uses a static private key. My goal is to trick the client into revealing enough information to reconstruct the private key (2048 bits) of this client. Let's call the vulnerable client Bob, while I am acting as a malicious Alice. This means th...
Consider this scenario: Alice and Bob need to share some secret messages. Alice is the sender and Bob is the receiver. This should be facilitated by Bob giving Alice a public key, such as in a certificate provided through a URL on a trusted site. The communication is one-way; Bob does not need to send any encrypted me...
So, far my understanding was Modular addition is non linear function which is mainly used in ARX based ciphers. While I was glancing through RC5 paper (https://link.springer.com/content/pdf/10.1007/3-540-60590-8_7.pdf) the author has mentioned that the only non-linear operation is "data dependent left-rotation", even t...
There are a large number of algebraic NTRU variants: for example, in some (such as ETRU), the underlying ring has been changed to the ring of integers of a certain number field; there is GR-NTRU, which is over group rings; there is NTRU over quaternions, and octonions, and even sedenions; and there are various other no...
I'm working with a zk-SNARK library [1] that allows me to prove the correctness of arbitrary arithmetic circuits, and I now want to use these zk-SNARKs to prove that some Paillier [2] ciphertext $c$ was generated by correctly encrypting some secret plaintext $m$ with randomness $r$ (as well as that some other propertie...
So, I need users to be able to pass me information that no one else can read, so I've generated a secret key. Using NaCl I create a key pair from that secret key and I share the public key of the key pair with my users. Now, they encrypt their information with nacl.box() which requires their message, a nonce, my public...
$e:G_1 \times G_1 \rightarrow G_2$, where $g$ is a generator of $G_1$. $\text{H}: \lbrace 0,1\rbrace ^* \rightarrow G_1$. Is $e(\text{H}(D)g^a,g) == e(\text{H}(D)g,g)^a$ ? where $D$ is a string
This might be a noob question, I've searched the web but couldn't find anything remotely close to what I would like to achieve. Maybe I don't have the correct jargon, so please bear with me. Basically, I am building an application based on microservices with a single authorization server that distributes JWT's, which a...
This is wrt to implementation of the salsa20_word_specification function at https://cr.yp.to/salsa20.html The 2nd for loop goes like this for (i = 20;i > 0;i -= 2) { .... .... .... } The value of i isn't used inside the for loop. So I am wondering why this loop starts with 20 & goes down to 0 decrementing 2 in each i...
From Section 3.1 in DJB's document on The Salsa20 family of stream ciphers- https://cr.yp.to/snuffle/salsafamily-20071225.pdf Salsa20 expands a 256-bit key and a 64-bit nonce (unique message number) into a $2^{70}$-byte stream. Where does this $2^{70}$ number come from?
Does module-LWE remains hard for an even modulus $q$, or a power of two? This is true for Ring-LWE (pseudorandomness) and Module-LWR (SABER). I can't find any reference to it!
In particular, in PKCS #11. Not a lot of information on the web; I found this explanations. Ignoring the empty marketing talk like “heightened security” and “centralized and secure management”, I managed to extract the following benefits: secrets do not leave the token, tamper-resistant audit of the usage of secrets. ...
I'm trying to build a differentially private machine learning model. I'm using the Gaussian mechanism to calculate the required noise amount based on pre-defined privacy budget value The equation to find the noise amount is below $\sigma = \sqrt{2ln(1.25/)} / \varepsilon $ I'm aware that when the model performs severa...
Alice creates ordered set of $N$ public messages $(m_1,...,m_N)$ and sequentially sends them to Bob. Bob evaluates $N$ functions $E_i(m_1,...,m_N)$ (possibly using a secret random value $r$ and/or his own private key $d_B$) and makes $N$ resulting values publicly available, but uses a secret permutation $P(i)$ before p...
I'm currently developing a product that requires user data to be encrypted on the client side. The product is a web app + a browser extension, so the focus is encrypting user data with Javascript. The concept is similar to what 1Password or Lastpass do, basically never storing user data in plaintext, and only the user ...
My apologies if this is obvious, but the truth is that I am confused about this. I am looking into RFC 8032 for test vectors for Ed25519, and I have some doubts concerning the information presented in section 7.1 in that document. At the top of this section one can find the following data: SECRET KEY: 9d61b19deffd5a...
My question is about the original IBE proposal by Shamir from 1984: https://link.springer.com/content/pdf/10.1007/3-540-39568-7_5.pdf In addition to proposing the idea of IBE, it also proposes a concrete Identity-based Signature scheme, however without proof of security or any reduction to a known assumption. Has it ev...
I'm new to lattice-based cryptography and have trouble understanding if the GSW13 (Gentry, Sahai, Waters) scheme works only on single bits. But is it also possible to encrypt integers with this scheme and add them together? Thank you
I'm not even sure if they are serious, but I've heard many times that some people refuse to not only trust their computer to generate a random string (which is understandable) but also don't trust themselves to do it. So, instead of simply typing/writing down: fcC540dfdK45xslLDdfd7dDL92 And then randomly changing a fe...
Short question: If we assume a one-session use public RSA keypair on both sides, and if we assume that the input stream will be split into blocks -- with CBC encryption -- is there any security disadvantage to encrypting the blocks directly with the RSA asymmetric key rather than deriving a symmetric AES key using DH a...
I feverishly searched the web and couldn't find a clear explanation about what exactly is "Ephemeral diffie-hellman". Let's briefly recall how diffie-hellman basically works: Bob and Alice agree publicly on a generator ($g$) and a prime modulo ($p$) Bob selects a private integer ($b$) and computes $B=g^b \bmod p$. He ...
Context Suppose Alice asks Bob to write a (python) code/function named get_sqrt(input) that computes and returns the square root of an input number named input. Next, Alice provides three random numbers as input to Bob. Bob produces the three output numbers using Bob's function get_sqrt(input) and returns to Alice: Th...
I am testing a TLS server that uses x25519 for key exchange. I am relying on Scapy-ssl_tls for building the TLS connection. However, this tool uses tinyec as its crypto library, and tinyec does not have curve25519 in its registry, thus this whole setup does not work. Does anybody know how could I add the curve25519 to...