instruction
stringlengths
32
27.2k
It's possible to use a hash function as an encipherment scheme if used in counter mode. Let's suppose I take a 64-bytes (512-bits) seed/key and hash it concatenated with counters, and use it as a encipherment scheme. But the hash function has its digest output size of 32-bytes. Some hash function such as Blake2 and Bla...
let's look at the public key in this post as an example: https://crypto.stackexchange.com/a/35105 MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB whe...
Recently a friend of mine showed me a "puzzle" he created with edwards curve ed25519 It is based on adding and multiplying points on the curve You supply four arguments to the program The 'public key' The 'private key' additional data static point value He considers the puzzle as solved if the following 'equation' ap...
I have been examining the Gazelle paper, which focuses on secure inference protocols. One section constructs a Garbled Circuit using inputs cx, sx, and sy to compute the ReLU function in neural networks. Here, sx represents the server's share of the input and cx stands for the client's share of the input data. The pape...
I am currently taking a course in university where we are working with a KeePass 2 database file. I am still very new to everything which has to do with encryption. First I am going to provide the information which was given to me: A Keepass 2 database file contains different headers, the important ones are the follow...
I've came across a Stackexchange question about the Chaum-Pedersen Protocol which is based on the generalised schnorr protocol. As I understand it, it uses discrete logs and cyclic groups of prime order q to prove knowledge of a secret value x, which in this scenario is an equality proof for the discrete log. The paper...
I have a custom network and I want to implement a symmetric key exchange and key derivation mechanism with ECDH. I know that I need to use KPP API and ECDH helper functions, but I can't find any code examples in Github or elsewhere (kernel documentation is a bit confusing for me, I'm new to this), so I started to think...
Ideally, Hashids -: https://pypi.org/project/hashID/ are considered insecure and it is recommended that we should not use them for any sensitive functions. Though, is a HashId considered secure if we pass a very secure random salt to it? Or will it still be vulnerable? Can someone still guess / reverse engineer the ori...
Does there exist a semi-prime integer $n$ (e.g., an RSA modulus) such that the order of every element in the multiplicative group modulo $n$ is equal to the order of the full group modulo $n$? If so, would such an integer be more resistant to factorization by Shor’s factorization algorithm (the quantum version) than a ...
I am trying to wrap my head around Homomorphic encryption, specifically the HEAAN/CKKS scheme. I am reading through the publication, but I am getting stuck on page 11, namely the KeyGen and Enc functions. My issue in understanding comes from the generation of the public key: $$ p.k.\leftarrow (b,a) $$ $$ b \leftarrow-a...
I am looking for examples post-quantum secure trapdoor functions. Ideally, the inversion knowing the trapdoor should be "simple" in the sense that it can be computed by a circuit in NC^1.
If I run cat my.key, I get: -----BEGIN RSA PRIVATE KEY----- MIIJKQIBAAKCAgEAu+UkIRXNZrdcnuCLsBsz/HiBcYNoAAAhYi2hISKBxkqX165U... but if I run openssl rsa -in my.key, I get a different content as: -----BEGIN PRIVATE KEY----- MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQC75SQhFc1mt1ye... why the contents are differ...
Consider a secure PRG $G:\{0,1\}^\lambda \to \{0,1\}^n$ and a one-way permutation $f:\{0,1\}^{n-\lambda} \to \{0,1\}^{n-\lambda}$. I'm wondering if the following construction $G': \{0,1\}^\lambda \to \{0,1\}^{2n-\lambda}$ is a valid stretch of the PRG output: Apply $G$ to the input $x \in \{0,1\}^\lambda$ to obtain $y...
I know how to prove the correct decryption of a (ElGamal) ciphertext. The above protocol is from the paper: Bootle J, Cerulli A, Chaidos P, et al. Short accountable ring signatures based on DDH[C]//European Symposium on Research in Computer Security. Cham: Springer International Publishing, 2015: 243-265. But,how to p...
This question was originally posted in https://ethereum.stackexchange.com/questions/151471/ethereum-signature-as-xml . I post it here aswell because I rarely get any response there. I am seeking to express an EIP 191 0x45 message signature according to the XML Signature Syntax. I assume this curve is the correct one: ...
Consider a function $G:\{0,1\}^*\to\{0,1\}^*$ with output size double it's input size, that is $\forall x\in\{0,1\}^n,\ |G(x)|=\ell(n)=2n$. Assume $G$ is a PRG in the sense of Jonathan Katz and Yehuda Lindell's Introduction to Modern Cryptography (3rd edition); that is meeting the Pseudorandomness criteria: For any PP...
I think I understand how asymmetric cryptography works. However I don't really understand why some exchanges use the signature generated by hashing the payload with the private key. From my understanding, if a public/private key pair is generated for ciphering, the payload is encrypted with the private key by the sende...
If I have TRNG data as input (A1,A2,B1,B2,C1,C2) - can I xor it to provide more TRNG data A,B,C,D,E,F,G,H ? A1 = TRNG1 A2 = TRNG2 B1 = TRNG3 B2 = TRNG4 C1 = TRNG5 C2 = TRNG6 A = A1 ⊕ A2 B = B1 ⊕ B2 C = C1 ⊕ C2 D = A2 ⊕ B1 E = B2 ⊕ C1 F = A1 ⊕ B2 G = A2 ⊕ C1 H = B1 ⊕ C2 EDIT: ⊕ is XOR operation, TRNG is true randomnes...
My problem is about this paper Efficient k-out-of-n oblivious transfer scheme with the ideal communication cost https://www.sciencedirect.com/science/article/pii/S0304397517309143 I don't know what is the "efficient algorithm" in section 3, paragraph 2, the second sentence of this paper. Could you give me some explanat...
I am investigating a PRNG which fails some of NIST tests (FFT, ApproximateEntropy and Serial). If such a generator is used in cryptography for any purpose, what consequences can it has? How this vulnerability affects its safety? What is possible attack? I want to discuss implications.
I'm trying to extract a private key from a .PFX file to a .PEM file format. I was able to do it using Aes128Cbc in either .NET or OpenSSL: .NET: PbeParameters pbeParams = new PbeParameters(PbeEncryptionAlgorithm.Aes128Cbc, HashAlgorithmName.SHA256, 1); byte[] privateKey = rsaPrivateKey.ExportEncryptedPkcs8PrivateKey("...
NIST 800-90C defines 3 classes of random bit generation (RBG) constructions: RBG1, RBG2 and RBG3. All constructions must include a DRBG from NIST SP 800-90A. The particular construction in question is RBG3, which is "designed to provide output with a security strength equal to the requested length of its output by prod...
I am trying to test my server program which implements TLS 1.3 connection - it should establish TLS 1.3 connection. My server uses a self-signed certificate, created in openssl. I am using Firefox v.112 as the client to connect and getting an error - "SSL_ERROR_RX_MALFORMED_HELLO_RETRY_REQUEST". How can I know the spec...
I have pairs of files A and B both of arbitrary size and contents (for any pair of files, A could be significantly larger than B or vice versa). I want to be able to 'encrypt' A in such a way that I can distribute it openly, but so that only people already in possession of the entirety of B can access any part of A reg...
I do not know why the intermediate value (for example, W5, W6) should be encrypted?? I think the encryption (random value) only needs in the input process (e.g. w1, w2, w3, w4).
U= 115792089237316195423570985008687907852598652813156864395638497411212089444244 a = 20412485227 E1 = EllipticCurve(GF(p), [0,1]) with order U E11 = EllipticCurve(GF(p), [0,1]) with order a Formula from Coords on E1 to Coords on E11 is Q11 = (U/a) * (x,y) (x,y) on E1 But, what is the reverse formula from Coo...
A HRNG that is NIST 800-90 compliant must use a DRBG in some way regardless of whether it adheres to a RBG1, RBG2 RBG3(XOR), or RBG3(RS) construction. This violates the requirement that the OTP is truly random (since there is a DRBG involved). Therefore, it is true that a NIST 800-90 compliant device cannot be used to ...
If we know the RSA encryption of messages m, m+1, m+2 when c=3, how can we compute m in polynomial time?
I wanna generate a list of numbers based on a unique string. They shouldn't be predicatble and every time to generate they are the same. Could someone help me pleeease :)?
I am testing my TLS 1.3 server (it does not use openssl library) using openssl s_client utility. I have found out that s_client can not decrypt encrypted extensions of the server. So I need to know parameters of decryption used by s_client. Could you tell me: How can I force s_client to output (if it is possible) keyi...
Diffie-Hellman key exchange is sometimes informally said to be hard under the discrete logarithm assumption in the chosen group. But if I am reading literature correctly, it actually uses a stronger assumption on the group and that's the assumption of Decisional Diffie-Hellman. Is there a key exchange whose SK-security...
I want to perform a modular reduction using Solinas prime value as q = 2^383-2^33+1. How can I efficiently compute it taking advantage of q being Solinas prime?
From the PLONK paper. Page 29, Round 3 Why multiply z(x) and z(Xw) in the quotient polynomial? (why does internal wiring have to multiply input permutation) Why the second term have to "shift by w"? My observation is: These 2 lines seem they have to cancel each other out. z(x) is permutation polynomial and only about...
My lecture notes state that of the AES operating modes ECB, CBC, CTR, CCM (CTR+CBC MAC) and GCM, only CCM and GCM provide authenticity. In CCM, as I understand it, the authenticity lies in the MAC, i.e. the symmetric key. AES-GCM calculates the authentication tag (AT) using, among other things, the additional authentic...
A $m$-dimentional full-rank integer lattice $\Lambda\in\mathbb{Z}^{m}$ can be defined as the set of all integer linear combinations of $m$ linearly independent over $\mathbb{R}$ basis vectors $\textbf{B}=\{\vec{b}_{1},\ldots,\vec{b}_{m}\}\subset\mathbb{Z}^{m}$: $$\lambda=\mathcal{L}(\textbf{B})=\left\{\textbf{B}\vec{c}...
I am considering using a hybrid approach by combining ECIES (Elliptic Curve Integrated Encryption Scheme) with Kyber KEX (Kyber Key Exchange) for secure communication. Instead of using the traditional Curve25519 key exchange in ECIES, I want to replace it with Kyber KEX, which is post-quantum secure. This way, I would ...
I am working on a proof for a secure aggregation protocol in which the server aggregates values from several clients. A challenge in the proof is that the server may lie about which clients have dropped out, requiring the simulator to equivocate the encrypted values it has sent to end up with the correct output on the ...
In go/src/crypto/internal/nistec/p256_asm_arm64.s Line 448 / 473 / 498 / 524, We can see the code mul Ord with hlp1 but NOT hlp0. According Montgomery Multiplication, shouldn't we mul Ord with hlp0? // First reduction step MUL acc0, hlp1, hlp0 MUL const0, hlp1, t0 ADDS t0, acc0, acc0 UMULH con...
This is from this video - https://www.youtube.com/watch?v=9VuZvdxFZQo Bob has a list of length $10^6$. Bob wants to convince Alice that every number in the list is between 1 & 10. Alice needs to verify it with just 2 queries & 99% certainty. This is the protocol given by Ben $f$ is polynomial created by interpolating ...
In the document Trapdoors for Lattices, section 5.4 Gaussian Sampling, they introduce the parameter $\sqrt{\Sigma_{\bf G}}$, which is related to the lattice $\Lambda^\perp(\bf G)$. They use it as a bound for the smoothing parameter of this lattice, therefore $\sqrt{\Sigma_{\bf G}}\in\mathbb{R}$. But later on, they do s...
I am trying to do some calculations with the Paillier Homomorphic encryption scheme. Specifically, given three plain text integers, x1, x2,and x3. I want to first encrypt them, getting their corresponding ciphertexts, say c1, c2 and c3. I want to find the results of (x1+x2+x3)/3 by utilizing c1, c2, c3 and the homomorp...
I would like to encrypt big files using an authenticated cipher. I am convinced to use approach where file is divided into smaller manageable chunks that fit easily in memory (e.g. 1-10MB size) which are encrypted, authenticated separately. Unfortunately such approach is prone to "reordering" attack at least. I am look...
If Bob takes a plaintext and encrypts it with their own public key and hands it to Eve who in turn encrypts it with her public key, we now have a cipher text that requires both Bob and Eve to decrypt it, to get the original plaintext. However once Eve has encrypted it, is there anything Bob can do to confirm that the c...
I am trying to prove to myself that an identification scheme derived from a digital signature in a challenge/response manner is secure, based on the security of the digital signature scheme. I've found an informal proof in these lecture notes, but I'm struggling to formalize it with a reduction. Let $\Sigma = (GEN, SI...
I am using ECDSA P-384 for signing and verifying messages. The messages are basically stringified JSON. After receiving, the recipient verifies the signature using the public key. Should the public key be included inside the message (aka the JSON which gets stringified)? Or should I send the public key separately along...
Consider the following definition. Let $p(n) > n$ be a polynomial, and $G_n: \{0, 1\}^n \rightarrow \{0, 1\}^{p(n)}$ a PRG. Moreover, given $x \leftarrow \{0, 1\}^n$, we say $S$ is a length $n-1$ contiguous substring of $G(x)$ if $S = s_0\cdots s_{n-2}$ with $s_i \in \{0, 1\}$ is a contiguous substring of $G(x)$. Then...
I have a decentralized coin system that I am trying to develop. Each coin can be split up into 1,000,000 units. I've been looking for a quantum-safe and practical (efficient) algorithm to send fractions of a coin between peers, so that other than the two peers that participate in the transaction, nobody could tell the ...
I'm researching to see if there is an algorithm that encrypts different inputs with different keys to produce the same output. So let's say I have 2 messages. var message1 = "My password is: Doggies!1" var message2 = "My password is shdhe93-4" And two keys. var key1 = "DummyKey" var key2 = "RealKey" I would like to...
Suppose my server receives a message, the public key, and the signature. The message contains a time stamp. Is there a way to get the time stamp from the signature to match it with the message time stamp. Or some other way to ensure the message was signed at the time that it says it was signed? I am using ECDSA P-384 b...
Let $r(b, t)$ denote the bitstring $b$ rotated to the left by $t$ bits: for example, $r(00110101, 5) = 10100110.$ Consider the following game. Player A picks two (different) $n$-bit strings $(T_1, T_2)$ and four arbitrary numbers $(a, b, c, d)$ less than $n$. Then Player A computes $$B_1 = r(T_1, a) \oplus r(T_2, b)$$ ...
Let $F = GF(2^n)$ and $P(x) = x^e, P : F \rightarrow F$ be a monomial of degree $e$. How to write each bit of the output of $P$ as a function of input bits? In other words, how to write it as a system of polynomials over $GF(2)$? One way is to use computer algebra systems such as sage and work as follow: sage: p = 2 sa...
I'm working on a Distributed Key Generation protocol. The idea is similar to this. TLDR: Aggregated Shamir Secret Sharing, each participant acts as a dealer & distributed the secret shares of its secret polynomial to the rest of the participants. Finally, the actual secret can be constructed by aggregating the secret s...
Considering that quantum computers (in theory) can break\reverse some of one-way-hashes a lot faster than conventional-computers. Is it technically feasible in any theoritical (but realistic) senarion, to store data "compressed" as in the form of an one-way-hash and reverse\restore\"decompress" it with the help of a qu...
The python code example on Wikipedia uses the 12th Mersenne Prime ($2 ^ {127} - 1$) as the modulus. I'd like to share a 32 byte secret. Is it safe to simply change the modulus to p = $2 ^ {256} + 297$?
TLS 1.3 specify two pre-shared key exchange modes, which are psk_ke and psk_dhe_ke. The former is a non-ephemeral key exchange where the master secret is basically derived from the pre-shared key, the client random and the server random; whereas the latter is ephemeral and derives master secret from those same data plu...
I am trying to understand the NIST-submissions for post-quantum cryptography a bit better, and I noticed that the submissions from the CRYSTALS-family in particular is based on Module-LWE. I understand that "normal" LWE has huge parameters, and that they went for Ring-LWE in Ideal Lattices over Rings because of the mor...
I am trying to understand which operations are computable by an $\texttt{NC}^1$ circuit. However, I am struggling to understand whether there is such a circuit for multiplying a matrix with a vector or if the circuit will necessarily be in $\texttt{NC}^2$.
By full alternatives I mean things that can do everything RSA can, namely establish secure security without privately sharing information prior. Something which AES can't do. In other words, I'm looking for quantum-resistant asymmetric encryption.
The Pedersen hash is a low constraints friendly hash for Zk-Snarks. Unlike many algorithms, the Pedersen hash returns a point P = (x,y) on a curve as a hash. Depending on the selected curve, there can exist a fast deterministic way to compute a different input that yields −P=(x,−y) using the Weierstrass form. As a resu...
In a similar anonymous PKE based on D-H key exchange, in a many-to-one (one-to-many) case, is there any way to implement authentication without revealing the identity of the sender (receiver)? Could you recommend some papers?
It is DTLS 1.2 version question of this question. I know from 4.1.2.4. of RFC 5246 (DTLS 1.2) AEAD Ciphers can be used in DTLS 1.2 exactly the same with TLS 1.2. In TLS 1.2 AAD = seq_num + TLSCompressed.type + TLSCompressed.version + TLSCompressed.length It makes sense since it is (implicit) sequence number + header ...
Given a certificate .p12 I want to extract the public key, the private key and Modulus and Exponent both from the public key and from the private key. I am using PHP and OpenSSL functions As I understand it, the Module and Exponent of the public key must be different from the Module and Exponent of the private key. ...
Let's say I want to perform addition on "small" numbers (if it matters, let's say integers between 1-10K) without decrypting the numbers -- i.e. I have E(A) (the encryption of A in a crypto system under a given key) and E(B) and I want to compute E(A+B) without decrypting A or B. The state of the art would be to use a ...
I have following simple function uint128_t crypto_aes_prf( ECB_Mode< AES >::Encryption& e, int message) { // Encrypt the input using AES unsigned char messageBytes[16]= {0}; unsigned char ciphertext[16] = {0}; std::memcpy(messageBytes, &message, sizeof(message)); e.ProcessData(ciphertext, messageB...
I have a program implementing a function $f$, and want to find a pair of functions $e$ and $h$ such that $h \circ e = f$, but $e^{-1}$ cannot be recovered from $h$. In other words, given some $e$-encrypted data, $h$ decrypts it and applies $f$. Knowing $h$ doesn't allow me to get back the unencrypted data, but rather o...
I recently looked into the subject of public key cryptography (especially with X.509 certificates). I am the administrator of a web server using HTTPS which uses 2 levels of certificates (in addition to the end-user certificate for the website). Here is the schema : The black line is intentional to keep the anonymous....
I have two files ctext0 and ctext1 that are byte files and they are encoded using the same one time pad, so I tried to write a pygame program to allow me to use crib-dragging to figure out some words like so: import pygame import sys import os file_size1 = os.path.getsize('ctext0') file_size2 = os.path.getsize('ctext1...
Rumba20 is a compression function that maps a 192-byte (1536-bit) string to a 64-byte (512-bit) string. It's designed to provide collision resistance by using Salsa20 (or ChaCha20) with the feedforward. However, from the Rumba20 webpage: Rumba20 is not designed to provide unpredictability, truncated collision resistan...
Is anyone aware of the source for a technique that incorporates external wire values into Garbled Circuits? I have come across this technique, which can be found here. However, I was unable to locate the primary reference for it. The purpose of this technique is to reduce the number of decryption operations required du...
I'm currently confused about the distinctions between two-party computation (2-PC), secure function evaluation, and private function evaluation. Additionally, I came across the term secure circuit evaluation, which has further added to my confusion. If these concepts are essentially the same, then why are they referred...
I am currently studying a course in cryptography, and I have this exercise about OWF. I'm failing to prove that this is an inverter to f. Am I in the right direction at all? Thank you!
I have a question regarding understanding representation of length in AES-GCM while doing padding for the IV to calculate ICB/J0. In the aes GCM test vectors testcase5 I see the IV is of length 8 bytes as follows: IV cafebabefacedbad But len({})||len(IV ) is mentioned as 00000000000000000000000000000040 but since t...
Reading about index calculus for discrete logarithm, I noticed that it works for $(\mathbb Z / p \mathbb Z)^*$. Is this the only situation in which it works? If not, please give examples of other situations in which index calculus works to solve discrete log.
I am new in the field of cryptanalysis and wonder how the differential cryptanalysis work
I am trying to implement a stream cipher that uses an LFSR PRNG. I have found resources online that give good primitive polynomials, but I am struggling to find resources with the initial states as well. I really need to be able to have something to test against so I know my code is working as intended. I would really ...
This question may be of no practical interest. But as a meaningful or meaningless question, can we extend the domains of the keyspace, input space and output space of a PRF to be defined over intervals of $\mathbb{R}$? For instance, let $I := (a,b) \subset \mathbb{R}$ be some interval of $\mathbb{R}$, and $F: I\times I...
Let's suppose I encrypt an 1MiB plaintext with AES-256 in ECB mode but using different keys for each 16-byte block (I know this is weird but it's just an example). Remembering that a different 256-bit key will be used for each 128-bit block, so if the adversary wants to break a block, a brute-force in the key space of ...
At a high level, the Uber assumption states that it is not possible to compute (distinguish) linearly independent elements. In the decisional version, the problem is restricted to $G_T$, but it is unclear whether the linearly independent elements can be from $G_1$. Here is a simple example: Let be type-3 pairing $E$: $...
Let's suppose I take 1MiB of truly random data and split in pieces (seeds) of 32-bytes (256-bits), so I hash each seed with a hash function with the same output digest size (32-bytes/256-bits) and XOR each piece of hashed seeds into a 1MiB plaintext. The random data is kept secret. My question is: Will this scheme have...
While XOR is used as simple symmetric encryption with arbitrary custom key, what is a simple asymmetric encryption that use arbitrary custom key? That means I want to be able to set custom private key or public key (in ASCII format). Expectation: pub = "mypubkey" pri = "myprivkey" msg = "hello world" encrypted_msg = e...
I need some help for the following simple game: An adversary is given a multiplicative group $\mathbb{G}$ and the 4-tuple $(g_1, g_2, g_3, g_1^a \cdot g_2^b \cdot g_3^c)$ where $g_1$, $g_2$ and $g_3$ are random elements from $\mathbb{G}$, and $a$, $b$ $c$ are hidden. During the challenge phase, the adversary either rec...
I'm having some trouble understanding the idea behind C_InitToken. I can tell what it does from the standard, but not its purpose. One of the things it does is to provide authentication of the user as the SO, or initialize the SO's PIN if the token comes from factory. The second half I understand, but the first one see...
I am trying to find out how to write a security proof for a two-party computation problem. I have read some examples to write simulators like $x_1 ∧ x_2$ problem and the example in Goldreich's book. I have also read some parts of Lindell's toturial . But I am still unsure about my understanding. I have also seen the pa...
I am mainly looking to perform this trick for fun. I have access to an API that uses WebCrypto under the hood for encrypt and decrypt methods. I would like to hijack the decrypt method in order to create a deterministic seed. I have read other articles, and it seems like this trick should be relatively straight-forward...
I have been investigating libraries that implement operations and protocols involving BLS12-381 curves. I have noticed an absence of libraries that support encryption over (either of) the groups G1 and G2 that are defined by the BLS12-381 curves. Is there some cryptographic reason that encryption (say, ElGamal encrypti...
I am recently reading about multi party computation and its various existing protocols. From what I understand, all the arithmetic operations are performed over a field or a ring such that when two secret values, a and b, are used to perform secure computation c = f(a,b), the output of the MPC protocol is c mod P (for ...
The Schnorr signature scheme was defined originally as $(c, s)$ such that $sG = R + cX$, and the verification process consisted of computing $R = sG - cX$ and then verifying that $c = H(R||m)$ so using only $H(m)$ would not have worked for verification. However, in the verification process of the Schnorr signature vari...
In theory this is what I have : Around 10 000 offline machines Each machine will generate around 10 000 ids I can program the machine in any way I want, but I prefer a low memory and low cpu They all will be generated in a short timeframe (1 day) It should not have id collision It should not be possible to determine w...
Suppose that there are $n+1$ parties - $B,A_1,A_2,...,A_n$ that want to share a secret key The protocol of exchanging is roughly the same as Diffe-Hellman Chose a group $G$ with an order of $p$ - a prime number and a generator element $g$ Each $A_i$ generates a random number $a_i \in \{1,...,p\}$ and send $B$ the valu...
Let's say I encrypt a message with some secret and store it in a database. Later, I want to securely share that secret with someone, so that they can read the message as well. Even later, I want to further expand the group of people who know the secret by adding another person. Basically, I want end-to-end encryption, ...
In your opinion, is the correlation between the length of the ciphertext and the decrypted text (even if it is approximate) a cipher vulnerability? Or is there a solution to this problem outside of it? After all, if the attacker knows the approximate size of the message, he has some information about what type of infor...
Assume we have a central issuing authority that sends each participant a share that reconstructs in key $P_k$. I.e. Shamir Secret Share with $2$ out of $N$ format where $N>3$. This central authority also broadcasts public key $P_a$ so every participant guaranteed to receive same $P_a$. Is it possible to generate such a...
They say the security of Diffie-Hellman depends on the factorization of (N-1), where N is the big prime number you feed it. More specifically, (N-1) itself has to have a big prime factor, such as (N-1)/2 also being prime. My question isn't about why that's the case or how to tell if it has a big prime factor or not, I'...
In AES, the MixColumns operation involves a linear transformation from GF(2^8)^4 to GF(2^8)^4. The branching factor for this transformation in the original AES is 4, and it is considered secure against differential cryptanalysis with 4 rounds, where the differential probability falls below 2^(-128). If we replace this ...
Assuming I have single-key Even-Mansour with single $2n$-bit permutation in wide-pipe Merkle-Damgård specifically with Matyas-Meyer-Oseas mode outputting $n$-bit hash. What security can I expect against collisions and preimages? Am I wrong to expect $2^\frac{n}{2}$ for both?
Suppose the circuit is a hash function with the input being the pre-image (private) and the output being the digest (public). If one knows of a collision can they create 2 different proofs that are equal bit-for-bit by inputting the 2 different pre-images that give the collision? It seems such a SNARK does not exist at...
This question is relevant for both crypto stack exchange and infosec stack exchange. I thought I'd ask here to get answers from a cryptography perspective. If two systems use the same public key signature system, is it reasonable to re-use keypairs from one system on the other? For example, both Matrix and the Solana b...
In evp.h, BytesToKey() generates the key from the passhphrase, IV and the MD5 digest in order to decrypt information used by the public/private keypair generation using AES-256-CBC. I am trying to isolate all the EVP_* functions into a standalone implementation for an embedded system. Does anyone have the actual functi...
I'm using ECDH for generating shared key for STM32 MCU. Which encryption/decryption algorithm should I use? I looked at RSA and AES project samples provided by STM32 but where do I provide shared key with message to encrypt? With the current implementation shared key size is 64 bits.
I create this question from here. I am working on a project with C# backend and mobile apps using Java and Swift. I found this documentation to use RSACryptoServiceProvider.SignData method to sign using private key. But I don't have idea on how to verify and decrypt it on Java and Swift. From my understanding, it's sig...