instruction
stringlengths
32
27.2k
A few months ago I decided to write my own custom prime number generator. One of the tests I use is a modified Miller-Rabin test that tests the number against base 2 and then only tests random odd numbers, instead of completely random numbers. I figured this might get better probability than 1/4^k for k rounds since if...
I'm taking 2 medium-length strings (50-70 chars) and hash them using md5 to get results like d2ae4f4919a10958e2c603782f0ec1cc, then recording the first 5 symbols of the hash to provide a (unique) short key. If md5 distribution is (almost) random then would the chances of a collision be 16^5 ([0-9a-f]^5) = 2/1.048.576, ...
Under the Wassenaar Arrangement and applicable export control law, symmetric cryptography of an (effective) key size of 56 bits or less is (generally) exempted from export control. I am forced to work within this constraint. My goal is to maximize security regardless. Encryption and decryption operations may take about...
By going through the document: https://www.dmtf.org/sites/default/files/standards/documents/DSP0274_1.2.0.pdf I could get that this spec will be used to verify the identify and attestation of h/w & firmware with the help of TCG_UDS spec. I want to know that do we have any other advantage of having SPDM specification?
Why is the signature in DSA the way it is? I am referring to $r$ and $k$ in the Signing-Algorithm depicted below. Is it really necessary to have both, $r$ and $s$, or would it still be secure if only one of them is used? In the Schnorr-Signature only one random number is involved, for example.
I am following the steps in LoRa Cloud in order to derive the PIN value using the Algorithm smtc0 (https://www.loracloud.com/documentation/join_service?url=derivation_schemes.html). I don't quite understand how the DMKEY(i) = (hash[0]+i mod 256) | hash[1] | .. | hash[15] is derived.
I've been reading about ZK-STARK. There's an example that appears in several blogs. The most detailed explanation of that specific example which I have found so far is in this blog. The description of the example (the requirement) is: Suppose that you want to prove that you have a polynomial $P$ such that $P(x)$ is an...
I am trying to implement ECIES properly with X25519/HKDFwithSHA256/AES-128-GCM with Node.js crypto library. It is not clear to me how to determine the input key material (IKM) to HKDF. Initially, I thought it is okay to directly use the shared secret generated by X25519 as the IKM. const {diffieHellman, hkdfSync} = req...
Would either $\alpha$ or $r$ suffice as challenge? I am aware that the signature and verification were to adapt. However, what is the motivation behind using two challenges?
What is the best known asymptotic/concrete complexity of modular multiplication? Using Montgomery multiplication, if $M(n)$ is the cost of one integer multiplication of $n$ bits, then the cost is $2M(n)+o(M(n))$ (assuming comparisons and bit-shifts are $o(M(n))$. Is this the best known?
I have read that despite strong connections between prime factorization and DLP an algorithm for the former does not imply the latter directly. But I was reading about the number field sieve and it seemed like the bottleneck was identifying smooth norms. Wouldn't an ultrafast prime factorization algorithm achieve that?...
The are some linearly upper bounds on Hermite's constant $\gamma_d$, such as $\gamma_d \leq 2d/3$, $\gamma_d \leq d/4+1$. So we can claim that $\gamma_d=O(d)$. There is also a rather tight asymptotical bound for $\gamma_n$: $\frac{d}{2\pi e}+\frac{\log(\pi d)}{2\pi e}+o(1) \leq \gamma_d \leq \frac{1.744d}{2 \pi e}(1+o(...
This is not a programming question. This is to confirm whether a crypto documentation is incorrect. I am using Rust's p384 crate. I am creating a private key from a JWK string. In the source code, at line 85: https://docs.rs/elliptic-curve/latest/src/elliptic_curve/jwk.rs.html#85 it says: The `d` ECC private key parame...
Key generation: Key Generation Firstly, the RSA algorithm will be used to generate a public and a private key. Generate two random prime numbers p, q. Select RSA public key, P k such that gcd(P k, Φ)= 1 and 1< P k < Φ. Calculate the RSA private key, Sk= P k mod Φ. Calculate Elgamal public key, g= P k, private key, x= ...
I was studying about how to transport keys from one HSM environment to another and it came to me that I would need some sort of transportation key so the HSM keys would be double encrypted. How would this key be generated so it would be imported in both HSM securely? Coyld It be used RSA or EC? Since the key could be ...
I wrote an attack based on frequency analysis to break the substitution cipher. The code is below by Python. ... import random import operator import sys cipher = """lrvmnir bpr sumvbwvr jx bpr lmiwv yjeryrkbi jx qmbm wi bpr xjvni mkd ymibrut jx irhx wi bpr riirkvr jx ymbinlmtmipw utn qmumbr dj w ipmhh but bj rhnvwdm...
I have a series of backup files which are being generated daily and which I need to store encrypted. The files are to be used by bob as and when they need it. I am planning to use public key cryptography with private key being held by the bob. The backup program will have the public key and will encrypt the files with ...
I'm trying to understand CKKS (non bootstrappable) and I'm struggling with the encoding part. I'm using the original paper , "Homomorphic Encryption for Arithmetic of Approximate Numbers ", also this notes "Lattices, Homomorphic Encryption, and CKKS" and this blog. I have four questions (will have sense after): If Im ...
I'm trying to understand the inhomogeneous SIS problem and I'm came across to a scenario that I don't know how to evaluate. Let $A,B \in \mathbb{Z}_q^{n\times m}$ be two random matrixes and $u,v \in \mathbb{Z}_q^m$ be two vectors of small norm $||u||,||v||<\sigma$, such that $A.u=B.z$. How easy would be to find anothe...
Let's say I have a public generator $G$, an unknown, private $p$ and a public point $pG$ on an elliptic curve. Given $pG$ it's easy to construct $-pG$ by just taking the negative. But can you construct $p^{-1}G$?
I am given the ECDSA public key x and y coordinates below, calculate the compressed public key in HEX: PubKey.X : 61702053028733271054209908027052318932346644879827564097906752978487519734153 PubKey.Y : 107222915356196552656214196479588207773590978294786246589469812962187242002272 How do I find the Compressed PubKe...
I am following Vitalik Buterin's article to study zk-SNARKs recently. I can understand the main procedure of zk-SNARKs when given example equation x**3 + x + 5 == 35. However, in cryptography, most equations contain exponents. For example, the prover may want to prove the knowledge of $a$ in $g^a=A$. In this case, an a...
Can cryptography solve this problem? Two people are chatting, Mr. X and Ms Y. They give each other a CRC16 hash of someone's name initials and salt a random number at the end (suffix). Ms Y: "I love someone with the initials {53d4}". Mr X: "Are that person's initials {da17}?" {CRC16} -> Original String {53d4} -> A7...
I am a bit confused about Sponge construction and Merkle-Damgard-style ones for hashing. The only advantage I see for sponge construction is that they are secure against length extension attacks. So if the application does not mind about such an attack, Merkle-Damgard should be better, Is that the case? My intuition is...
This might be a silly question. But since more and more people simply use public blockchains as a secure ledger to store mutually agreed information to secure their high level applications, could we abstract blockchains as a secure ledger primitive that has the following properties: Append-only Tamper-proof (by minori...
I'm trying to read about Diffie Hellman (One to One) kind of protocols for group communication. Is Message Layer Security the state of art protocol for group encryption (not necessarily chat or application layer)? I found Tree Based Group Diffie Hellman as one such handshake algorithm for group encryption, but not sure...
From the PLONK paper. On page 19 & ahead, the permutation check is described. In particular, on page 20, the protocol is described. Step 5 of the check is described as Verifier checks if for all $a \in H$ a) $L_1(a) (Z(a) -1) = 0$ b) $Z(a) f'(a) = g'(a) Z(a\cdot g)$ However, in the actual Round where (I think) this che...
I understand that R.x is a field element. I don't understand why in ECDSA verification ie. FIPS 186-5 section 6.4.2 step 1, we check whether r is less than subgroup order. If it has something to do with the curve (what?), then why in BIP340 Verification step 2 do we check whether r is less than the field order?
Why is the following protocol never used to share a symetric key between two parties ? ⊕ is the XOR operation. Alice has M and wants to send it to Bob. Alice generates K₁ randomly. Bob generates K₂ randomly. Alice has M. Alice : M -- ·⊕K₁ --> M⊕K₁ Alice sends M⊕K₁ to Bob. Bob : M⊕K₁ -- ·⊕K₂ --> M⊕K₁⊕K₂ Bob ...
How fast are the fastest ones? Which ones have the most entropy? Which ones are the most practical ones? I tried looking for answers on Wikipedia and also, I tried reading papers, but I am couldn’t find answers to these questions. I was looking for a recent paper that would have compared all the TRNGs, but I couldn’t f...
Summarized Question: In the context of JWK generation using RSA-PSS 4096bit with SHA-256, where the public exponent is "e" = 65537, is there any situation where the prime number 21863 comes in view? Context: To start, I'm not well versed with the mechanics of the algorithms discussed here, just the overview. The questi...
I want to create an application in which users can cast vote to blockchain in encrypted form using RSA. The private key will be revealed only after completion of the election. My major use case is as follows: There will be certain number of candidates, $c$. So voter has to choose a number from $1$ to c, lets say his c...
I was reading the Coercion-Resistant Electronic Election paper and don't understand why the authors chose a modified version of ElGamal. I guess that it was for security reasons. If so, what are the security issues of using a basic ElGamal scheme?
I am trying to solve a CTF challenge based on DES. I attached the code of the challenge to the question. So far I have noticed that the otp used for the encryption is the same for the entire session, and my idea would be the following: Get the OTP by using choice 1 Use the obtained OTP to decrypt the ciphertext given ...
I'm currently undertaking a course on Blockchain cryptography. And our first project is to transfer tokens from one wallet to another using client / server application. All mock of course. This project is using the prescribed https://www.npmjs.com/package/ethereum-cryptography The theory is this as I understand it: C...
Which method will generate stronger secret? 64 character secret generated by nanoid (https://www.npmjs.com/package/nanoid) with characters: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_- e.g.: hNr3COb9fSz5qfZBCQx3GkpLVW-tbVM0E-Nl8xgcf8Js8-l6fqOIfSd6Gk-T_nkE or crypto.randomBytes(32).toString('hex') e....
I am trying to solve another CTF challenge. The challenge consists in trying to exploit an oracle that decrypts any hex text we send (see code below). I am kind of stuck on this one as this is not a classical challenge, since the decrypted text is not displayed. My guess would be one should exploit the fact that except...
I was looking at the security level of instances of sponge construction on Wikipedia depicted in the following image. It seems to me that the security level for collision resistance follows the formula $\min(d/2,c/2)$ while for the preimage it is $\min(d,c/2)$. Can somebody explain why it is the case, please? I mean w...
There's a keyed-permutation I'm playing with, $\ell_{i,x} = \pi_i(x_i)$, which is a bijection $X \leftrightarrow X$, where $|X| = 2^{256}$, and whose evaluations on plaintext inputs $x_i$ perfectly fill out a Latin-square, $L$, when an appropriate incrementing function, $\pi_{i+1} = \pi_i\mathrm{.step()}$, is applied o...
Is anyone aware of an in-depth study of algorithms using preprocessing to compute fixed-base exponentiations? Assuming I am willing to do arbitrary computation in the preprocessing phase (but not store an arbitrary amount of data afterward), what is the optimal time/storage tradeoff here? Note: I have read this page on...
Say we have a very limited password space with only a 4 digit PIN, so only 10000 PIN possibilities. Say also that the attacker has access to the stored form of the PIN. Can breaking the PIN be made reasonably difficult by storing the PIN in a way that makes the reverse computation impossible, as well as the storing i...
I have an application that encrypts files in the following manner (I think I can hear sighs already but bear with me): Start with two byte arrays generated from random strings of lengths l1 and l2 (fwiw, l1 and l2 are primes) Loop through both arrays (nested loop) and generate a third array of length l1 * l2 where eac...
Christel Bach's elliptic curve calculator has the coordinates for the "point at infinity" be $(0,0)$. Is that just a stand-in?
The effectiveness of hash function attacks is typically measured in $x$ broken rounds of $N$ total designed rounds. And some constructs containing iterated hash functions include proof of work schemes, blockchains and key derivation functions. Constructs like $H^i(...)$. What is the predicted effect on $x$ as $i$ incre...
I am currently playing around with some of the Python FHE libraries and found out that, e.g. TenSeal (SEAL) is able to perform "only" 8 ciphertext-ciphertext multiplications on the same ciphertext (8x1 Vector) (c1 = c1*c2 in a loop) before the noise threshold is surpassed and decryption fails. The parameters I set for ...
I was reading the paper One-way Accumulators: A Decentralized Alternative to Digital Signatures by Benaloh and de Mare [link], and in section 4.2, they say that given $z\in (\mathbb{Z}/n\mathbb{Z})^*$ and a set $$\{(z^{1/m_1}, m_1),(z^{1/m_2}),\dots, (z^{1/m_k}, m_k)\}$$ with $m_i \in \mathbb{Z}$, computing $z^{1/r}$ f...
I'm designing a cipher which has key-dependent S-boxes. The procedure is like this: Transform the key (a string of bytes) into 96 16-bit words (the high bits are ignored, but make a difference when these 96 numbers are reshuffled to make the other two S-boxes). Start with the identity permutation [0..255]. Take it 8 b...
Given the following conditions: The encryption program, which uses some algorithm resembling AES-128 but with unknown modifications to real AES-128. It uses a fixed key and IV. It is written in Rust WITH debugging symbols but no source code is provided. One is able to provide an input and get the encrypted output back...
Scenario: Consider a scenario where Server 1 stores a 600-800 KB ebook encrypted with a certain private key. Server 2, a computation-purpose server, holds this private decryption key and get access to the encrypted file. Its task involves decrypting the file and re-encrypting it with a public key using a specific algor...
I am currently reading the paper "A 2-round anonymous veto protocol" and have run into some trouble verifying the claims made about the zero knowledge proofs presented within. My knowledge of ZKPs is relatively elementary so I am looking for guidance as to where I may be going wrong in my understanding. The relevant qu...
Using Fiat-Shamir, an interactive 3-round sigma protocol can be compiled into a non-interactive zero-knowledge proof in the random oracle model. A NIZK through Fiat-Shamir is not UC-Secure due to rewinding. There are some straight-line-extractable compilation techniques, and to the best of my knowledge, the most effici...
Use of plain random-IV's in CTR mode, without any special "nonces/counters" (or any "dedicated" bits!), can lead to problems with "partial overlaps", whereby attackers can execute known-plaintext-attacks if there is a collision in the keystreams used for encryption. But, what if we just simply use that random IV also a...
Can anyone point me to techniques for efficient computation of modular multiplication/exponentiation modulo a square, as comes up, e.g., in the context of Paillier encryption? The standard references don't seem to have anything relevant, probably because they tend to focus on RSA and/or elliptic-curve cryptography wher...
I have a Windows 10 laptop with an algorithm that creates a random number using the PRNG CryptGenRandom. According to Wikipedia: Because CryptGenRandom is the de facto standard CSPRNG in Win32 environments, its security is critical for Windows users. However, The specifics of CryptGenRandom's algorithm have not been...
ECDSA and EdDSA both require the generation of a single-use value. Are there any elliptic curve signature schemes in existence which don't require nonce and maintain the usual security strength equal to that offered by the curve?
Is it safe (or optimal) to use a BCrypt hash directly as the key to an HMAC-SHA256? I ask because all the BCrypt hashes I will use contain the same salt, version, and cost, so the first 29 characters of the hashes will all look the same, e.g. "$2a$06$/H63GWnve78WGVBSDouFTO". I'm not comfortable with this much known str...
In Kyber-CCA-KEM, there's a step in the Fujisaki-Okamoto transformation, where decryption failure results in a random shared secret returned from the decapsulation call. I have a C language project currently implementing RSA-OAEP and ECDH, and I haven't reserved a PRNG parameter for the decryption interfaces, since the...
Imagine a large array (Megabytes) that is virtually empty, i.e. contains 0 in almost all locations. But also imagine there's 1000 pseudo random locations that contain a pseudo random byte. There is no correlation between bytes nor locations. So on average, there is a random byte > 1000 bytes apart. Then the entire arr...
(Cryptographically and hash/checksum wise consider me a rookie, as I'm rather just using algorithms.) While there are many names, not all of them are explained - I tried searching for the meaning of a couple of names, but found neither an explanation in Wikipedia articles (multiple, like English, German and French), no...
I need to prove that given vector of commitments of length N contains N-1 commitments to zero (and one to an arbitrary number). More formally, given vector: $$\textbf{a} = \begin{bmatrix} C(0, r_1) & C(0, r_2) & C(x, r_3) & ... & C(0, r_N) \end{bmatrix}$$ I want to prove that there is exactly one such commitment, ...
I now understand the initial key from all the round keys will be the original 4x4 block for 128-bit keys, but I do not know how it would work for something else, like AES-256 or 192. Would it be that you copy the rest of the key and put it into the second block, but what would you do with the third and fourth columns? ...
since I already have plaintext and ciphertext why would I need the key for? what purpose would that serve?
Edit: One half of the answer to this question also applies to a recently asked and now deleted question regarding the impact of an algorithm which breaks DLP over integers but has no impact on factoring. It would be tricky to go pure RSA. This is a question based on hypothetical scenarios, please bear with me. Consider...
Might be a bit weird but interesting scenario: I have a telegram bot and I need to authenticate users but I don't want to store any user data(at least openly). So here's a breakdown: I need to prove that the user has access to the bot. So there's a "timeframe" variable, an extra piece of information which might be hel...
I want to create a shared secret from a short string (e.g. a password) which should be easy to decrypt also in the long term. Unfortunately, I have quite a hard time to make the different tools work with each other (e.g. encrypt with ssss and decrypt using an online tool like that one.) How should one convert the stri...
I have been looking for benchmarks on the precomputation phase of PLONK (https://eprint.iacr.org/2019/953.pdf), but found none. Is there a resource where one can get a feel for this? Either in terms of CPU cycles or in terms of asymptotic complexity. Specifically, I am trying to estimate how big of a burden it is to up...
It cannot be "frequent" because that implies $H$ is not really 256-bit. Are there statistical or mathematical bounds on this? Finding the inverse is computationally difficult, but what matters here is existence.
I know the standard algorithms for D-log. Pollard-rho, Baby-step-big-step, Pollig-Hellman, index calculus, etc. I'm looking for fast algorithms to find a relation for the generalized discrete logarithm: $$\prod p_i^{a_i} = 1 $$ That is, given $p_i$, find some non-trivial $a_i$ for the above relation. What are the curre...
I'm new to cryptography and I was trying to find key to an intercepted vigenere ciphertext using ciphertext-only attack, I'm following book "cryptography and network security" by Forouzan. The book introduced some complicated formulas for finding Mutual Index of Coincidence but I didn't get it. This was mentioned in th...
I am working on an investigation on TLS 1.3. I've came across an article of qacafe where they shared a TLS 1.3 handshake sequence. Wireshark capture. In this capture you see that in the Client Hello a key_share is being send where it is "guessing" which cypher suite to use. This saves some bytes. by not having to send ...
If we have a scheme for inner product predicate encryption (IPPE), then can we claim that we already have designed an attribute based encryption (ABE) scheme; So we do not need to design an ABE again. I mean, is IPPE more general than ABE? What about predicate encryption (PE)? I think PE is more general than ABE, Righ...
Suppose I have some ZK proofs that were turned non-interactive using Fiat-Shamir heuristic. So I need to generate the challenge value deterministically using some data shared between the prover and the verifier. Different proofs require different challenges of varying size, so using a fixed-output hash is not very conv...
Is there a cryptographic function that employs two locks: first 'Lock A', and then on top of that 'Lock B' but it permits unlocking 'Lock A' before 'Lock B' to read the message?
Does AES-GCM take replay attacks into consideration? If an attacker intercepts the AES-GCM secured message and gains access to the initialization vector (IV), can they inject falsely fabricated data (ciphers) or replay past data (replay attack) to confuse the recipient? (Since the IV is also sent along with the messag...
While setting up PGP for the first time, I am presented with various encryption standards I can use being: RSA (2048, 3072, 4096 bits) with an option for + RSA (2048, 3072, 4096 bits) DSA (2048 bits) with an option for + Elgamal (2048, 3072, 4096 bits) ECDSA/EdDSA (ed25519, brainpoolP256r1, brainpoolP384r1, brainpoolP...
From the PLONK paper. On Page 31, Point 6 Compute the Lagrange Polynomial Evaluation $L_1(\zeta) = \frac{\omega(\zeta^n - 1)} {n(\zeta- \omega)}$ I don't think this formula is correct. We have $n$ gates from $H=\lbrace 1, \omega, \omega^2, \omega^3, ..., \omega^{n-1}\rbrace$. So the formula for computing $L_1(X)$ shoul...
I was working on implementing shamir secret sharing in GF(2^256), According to my knowledge multiplication in a finite field is defined as mul(a,b) = (a*b)%mod, where mod is the irreducible polynomial. But when I saw the implementation here, It uses bitmasking to multiply and when I compare my multiplication results wi...
I have a quick question. How would you decrypt an encryption scheme, involving both Hill and Vernam Cipher. The order of encryption is Hill Cipher then Vernam Cipher. Problem is that only final cipher text and the original plain text is intercepted. Without the cipher text derived from the Hill Cipher, I can't think of...
$H_k$ is a cryptographic hash function that's keyed using a section of key material $k$ (for whatever definition of "keyed" that's appropriate for the given hash function $H$). Are the following two methods roughly equivalent ways of authenticating that the section of key material $k$ is associated with the section of...
I have temporal data from experiment and by setting a threshold, I convert them to zeros and ones. I saved these binary bits to txt file (normal txt file from MATLAB) with each line has 32 bits (total number of bits is a little over 20 million). When running the NIST test suite, I use ./assess 500000 with 40 bit stream...
I am using the NIST test suite to test random binary numbers. when I tried it for data.pi, the generated report has some items that can not be interpreted. for example, the coeffecients named C0~C10. I am using 20 bit streams. My question is how do these coefficients relate to the 20 streams? and what do they represent...
I am using DES encryption when writing a file in an embedded device. When I decrypt the file. I get a partially corrupted file. Kind of randomly some 8-byte blocks are corrupted. Some are not. When I regenerate the file, It shows the same corruption. But If I reset the device, the file is okay. My DES encryption functi...
Common PIR schemes only protect the client's privacy, not the server's, while Symmetric PIR(SPIR) can do both. In many papers, it is mentioned that we can use the Naor and Pinkas method (https://dl.acm.org/doi/pdf/10.1145/301250.301312) to turn a PIR scheme into SPIR one, however when implementing this, I found this me...
While working with AES 256 in CBC mode, I learned that it requires Key Expansion - forward (for encryption) and reverse (for decryption). Does AES CTR mode also requires such a step ? Or can the 256 bit key be used as is ?
I have a challenge in which I need to decrypt 32(?) bytes of plaintext, which by encryption resulted in 48 (this for sure) bytes of data. It's a black box challenge, but managed to figure out the above and below. According to this https://security.stackexchange.com/questions/207633/decrypting-aes-128-cbc-leads-to-first...
n, e and modulus of RSA are given and n is very large. p and q are primes generated by pow(7, random_seed, modulus), and the seed that p and q used is very close. How can I get p and q, or is there any other way to decrypt this RSA?
If we have a Diffie-Hellman oracle then given $g^x$ and $g^y$ we can construct $g^{xy}$. Can we construct $g^{x^{-1}}$ given $g^x$?
I ame reading the paper "Secret-Sharing schemes: A survey" by Amos Beimel. Here there are two definitions of secret sharing. The first one states:\ A distribution scheme $\langle \Pi,\mu \rangle$ with domain of secrets $S$ is a secret-sharing scheme realizing an access structure $\mathscr{A}$ if the following holds: C...
I use an offline password manager, I want to use a future proof very strong master password and I'm going to choose one of these options from the EFF's large wordlist, a randomly chosen 8 word passphrase (104 bits), or a 10 word (128 bits) or I can even use a 12 word generated passphrase... Which one should I choose? F...
Is RFC 6979 guaranteed to prevent the reuse of nonces for different signed hashes?
It's that time of the year - I'm trying to learn how AES-128-CBC encryption works. My key is (since it's AES-128) is 16 bytes, my IV is 16 bytes as well. My implementation of key wrapping does apparently does not help me much to comprehend the concepts behind and neither does reading the RFC. Hence I turn for answers t...
This is about the KZG Polynomial Commitment Scheme In Section 2, it's written We use the notation $e : \mathbb G \times \mathbb G \mapsto \mathbb G_T$ to denote a symmetric (type 1) bilinear pairing.The choice of type 1 pairings was made to simplify presentation, however, our constructions can easily be modified to wo...
Imagine a channel where the initial secret for deriving of the actual key is established with ECDH. First, that shared secret is used to derive a temporary key with some default parameters (salt, iterations) embedded into the software. Then this channel is used to exchange random parameters specific to each direction (...
I'm working on a challenge like this: def weird_func(FLAG) enc_flag = [(a + b*i) % n for i in FLAG] return bytes(enc_flag).hex() Although I know the FLAG prefix which is flag{, without knowing a,b and n, I find it hard to calculate the whole FLAG. Only enc_flag is given in hex. I tried to brute-force but it se...
Monoalphabhatic Random Subsitution Cipher is pretty hard to crack compared to Ceasar Cipher especially through brute force but using frequency analysis, provided enough cipher text is easy. But what if key for the subsitution changes lets say every 16 characters. Then there wouldn't be enough cipher text for frequency...
I am working on TLS 1.2 Cipher TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, After send the application data server throws an error message Encryption alert (21). I have mentioned the parameter shard by the server given below. Decryption key: ab98fbfabe869b008697b9f62b8f59ee7a3165db6a0fdc37e2bac41d73995889 nonce: f53672195e4412...
We know that we can factor integer $n = pq$ when we know that $p\oplus q$, where $\oplus$ means xor. If we know $\lfloor \sqrt{p} \rfloor \oplus \lfloor \sqrt{q}\rfloor$, can we factor $n$?
I'm making a cloud-based service. So, basically, my users will be able to upload files (any type of files) and they will be uploaded to a server. I am aware that I have two options: Upload the files first and let the back-end handle the encryption Encrypt the files first and upload then to the back-end I want to use ...
If order of the cyclic group on which discrete logarithm is done is $2q$ where $q$ is a prime such that $2q+1$ is a prime, then using square root identification we can get the lsb. How about if the order is $2^rq$ where $r\in\mathbb Z_{\geq1}$, can we extract the least significant $r$ bits in polynomial time? If so, th...
I have given three points $ P $, $ Q $, $ R $ on Twisted Edwards Curve over prime finite field $ \mathbb{Z}_p $. $$ ax^2 + by^2 = dx^2y^2 + 1 $$ I know about given points that point $ Q $ is doubling of point $ P $ and $ R $ is doubling of $ Q $. But I don't know the coefficient of curve's formula $ a $, $ b $, $ d $ a...