instruction
stringlengths
32
27.2k
I know this question is being asked to death here but please hear me out. I was learning how to encrypt using AES and in one of the methods, we have to calculate multiplicative inverse in the finite field $\operatorname{GF}(2^8)$ to make $S-box$. I learned finite fields and its operations but while calculating the inve...
We all know that applications of crypto primitives like to not think about the management of nonces, and initialization vectors and often prefer to just set them to random values. This sometimes leads to problems, when then IV is too short. For example, in AES-GCM, the variable part of the IV is only 64 bits. If for ea...
I'm not an expert in PQ-crypto, but as I understand error-correcting code and lattice-based crypto, the cryptographic assumptions are very similar. The key difference for me is the nature of the noise. In one case, the noise is inspired by the "physical noise," in the other, it's more mathematical and considers a more ...
Let's say we have keyed hash function which transforms $256$-bit input into $256$-bit output and the attacker knows the key (let's say the key is $256$-bit long). Now let's consider we will construct an input block as: $128$-bit message (first bits), $128$ random bits (last $128$ bits). Now output could be kind of ra...
To moderator, this my question is not off topic !!! Please OPEN MY QUESTION. If for this place elliptic curves was off topic this so world is crazy. p = 115792089237316195423570985008687907853269984665640564039457584007908834671663 $E4 = EllipticCurve(GF(p), [0,4])$ $E7 = EllipticCurve(GF(p), [0,7])$ base_x = 0x79BE66...
I am making a messaging system where users are identified by their public keys. It doesn't matter which friendly username they have, so I'm not going to prompt them to choose one. Each user will have a directory that will get their messages saved to, so it would be nice if the directory that belongs to them has a sho...
We know that for a real full-ranked lattice $\Lambda$, with real square matrix $\mathbf{B}$, the dual lattice $\Lambda^{\vee}$ has matrix $(\mathbf{B}^{-1})^T$. Now If we have a complex lattice with $N \times N$ complex matrix $\mathbf{C}$, what would be the matrix of its dual lattice? Would it be the same? Or we need ...
I want to create a $4\times4$ multiplicative inverse table in $GF(2^4)$. The primitive polynomial given is $P(x)= x^4+x+1$ (NOTE: the values in the table need to be in hexadecimal format, hence I'll be using both polynomial and hexadecimal notations in the question henceforth). Now, I was able to compute multiplicative...
I am pretty new to cryptography. Recently I run into this question where I have two different public keys with the same private key, and I need them for fully homomorphic encryption. Let's say messages from party $A$ and party $B$ are encrypted by two different public keys and FHE operations are performed on the encryp...
NOTE: QUESTION UPDATED. SEE BOTTOM OF THIS POST. I'm writing something where I need to make someone come across as though they know cryptography. I don't know enough, but as cryptography plays only a very minor role in what I'm writing, there's very little I need to know. As I understand it, a password is a (preferably...
SEDs use a user password (PIN) to generate KEK by a KDF algorithm. The KEK is then used to encrypt the MEK (where MEK is internally generated in the drive). But TCG-Opal drives have 9 locking-ranges and each of these ranges uses its own MEK (say MEK1 - MEK9). There are also 4 Admins and 8 Users, each has its own passwo...
I was wondering whether there are any "blinded" encryption schemas, such as the following: We encrypt message $m$ using $f(k)$, where $f()$ is some blinding function and $c = \text{Enc}(f(k), m)$, while the decryption works as $m' = \text{Dec}(k, c)$ and $m' = m$. One possible option is, of course, public-key encryptio...
I'm curious about the honest minority case and what cryptographers have and are currently using to get around this. My motivation is primarily the MPC space, but I'm sure there are other subfields that encounter it. Some thoughts of mine include: It seems that a high threshold Shamir Secret Sharing Scheme or just a va...
I have read multiple websites to see what would happen with RSA when $\phi(n)$ and $e$ are not relatively prime, but no one has discussed it. Can someone explain how to decrypt $c$ if $\phi(n)$ and $e$ aren't relatively prime?
Note: following Maarten Bodewes's answer, I edited this post to make it clearer. I'm writing something partly driven by the need to crack a few encrypted files. This is what needs to happen in the story: There are two parties involved that are trying to crack them, party A and party B. Party A has had them for four yea...
When comparing the RSA-PSS signature algorithm with an elliptic curve based algorithm such as EdDSA, it is clear that signature verification takes less time for RSA than for EdDSA. For signature generation the situation is vice versa. I am asking myself whether there are use cases were a fast signature verification is ...
Summary: As a trainee, I got the task to extract encrypted passwords of our external password manager (Zoho Vault) and decrypt them. The documentation regarding how to decrpyt them is...none. I ask the support for help, but they send me only some pages of their documentation... Research and attempts: According of my ac...
I have doubts about whether the protocol below for LSB extraction (denoted Mod2) from the paper Improved Primitives for Secure Multiparty Integer Computation is correct. Clarifications will be appreciated. The protocol above calls PRandM(k, 1) in line 1 to generate random shared values $r''$ and $r'_0$ (it ignores $r'...
I started studying Elliptic Curve Cryptography, and I do not know if I understand the difference between ECDH and ECIES (even with the other posts here on stackexchange). I'm wondering if ECIES can be used to encrypt the ECDH key exchange to guarantee that it does not exist a man-in-the-middle. I'm thinking about this ...
A smart contract (a publicly known program) needs to check if the data D is correct (belongs to some fixed set). It is by definition correct if our trusted server checks it and decides it's correct. To check it, the contract receives a hash H from a trusted server. The server knows secret S. It should be impossible to ...
With the ever increasing risk of attackers compromising password based encryption by brute forcing or guessing passwords, are there alternatives to this traditional scheme of deriving encryption keys from passwords. I realize that there are memory hard hash functions like Argon2 that creates derived keys from passwords...
I couldn't find any articles that addressed to how to decrypt c after it was encrypted using the Pohlig-Hellman cipher if $e$ and $n-1$ aren't relatively. Can someone please tell me how to do it? I couldn't find an questions about this on StackExchange.
I’m very new to cryptography and I need to use a symmetric cryptography approach. My simple question is, will the key always at any time be able to decrypt the encrypted text? The encrypted text may be years old, and key will be saved years before as well. Is there any time factor applied that may make the decryption f...
I'm talking about when two chat users want to verify their identities via public key fingerprints. If the Client app is closed source, and we cannot see what it is doing, isn't the Server able to play "Man in the middle" attack here? Client app would just need to display fake but matching fingerprints to both users, an...
Is honest verifier zero knowledge closed under sequential composition? My guess is that since the verifier has to throw random challenges, they cannot adapt their challenge from the transcripts of a prior HVZK and thus cannot learn any additional information?
While encrypting AES in CTR mode, the input to the AES encryption function is the either a combination of IV + $m$ bit counter or is either $0$ IV bits with an $m$ bit counter. It is however rare to see the full usage of the input block ($128$ bits) as just a counter. Since CTR mode essentially converts a block cipher ...
In this article, there are cached certificate revocation list and online certificate revocation list terms used. I tried to find what these lists are but could find any human-readable info. I want to understand where are these cached list stores on my computer (Windows, Linux) and what online list is used during online...
In order for Diffie-Hellman to be extra secure we must use a safe prime which is (p – 1) / 2 will also be a prime. so my question is what extra benefit of using such a prime, what's new does it bring to the table. and does using a regular prime make the problem much easier to solve(make an attack practical). g^ab m...
It has always been a question surrounding in my mind whether a zero-knowledge proof ($\mathrm{ZKP}$) is the same as zero-knowledge proof of knowledge ($\mathrm{ZKPoK}$), but it was not since today that these concepts are creating problems in my understanding of cryptography. So, what is the real difference (if there is...
I'm new to Quantum Resistant Cryptography, so, I thought of diving into Lattice based crypto, LWE and ring LWE. I realise that the hard problem involving them is the "shortest vector problem". But I don't understand why it is a hard problem, or comprehend its hardness. The only sources that I can find on the internet, ...
I want to implement a pipelined architecture of AES128; and I couldn't figure out the number of the pipline stages. As I undestand, it is possible to make the piepline stages inside the round, or outside it or both. What I don't understand is if the I chose to make them inside a round, why the number of stages must be ...
Introduction: I've tried to find how reusing one-time key compromises itself but only found information that it breaks the encryption entirely, it is written everywhere. But since no methods to reuse or restore the key were specified I don't quite get how it can be done, even with plaintext and tag given. Problem: we h...
Having the following instructions: Using Paillier encryption to encrypt $m$. So, we get $Enc(m)$ Multiply $Enc(m)$ and $A$ to Get $C$. So, $C = Enc(m).A $ Decrypt $C$ using Paillier Decryption algorithm ($Dec(Enc(m).A)$ Knowing the value of $A$, is there a possibility to have $Dec(C) = A.Dec(m)$ ? How can we get the ...
On my website I display an image. To generate this image, it require a string parameters. For example the string 1234,2423,1231 as the parameter. Anyone can use my API (no authentication required). For example example.com/generate?param=1234,2423,1231. That is how my API works right now. To generate a different image, ...
This is from Bruce Schneier's Book Cryptography Engineering. In his description of Meet-in-the-Middle attack, he writes (Chap 2, Page 35) A meet-in-the-middle attack is more flexible than a birthday attack. Let’s look at it in a more abstract way. Suppose we have N possible values. The first set has P elements, the se...
Elliptic Curve Cryptosystem has various coordinate systems; like the Affine, Projective, and Jacobian coordinate systems. We prefer not to use the Affine coordinate system during the calculations since the operations require inversion and that is much costlier than multiplication. Katz and Lindell, in their book, wrote...
I have the following problem: I have $t$ servers $S_1, S_2, S_3, \ldots, S_t$, each of them storing some $key : value$ list. They have to upload this data into a big dropbox server $D$, but in such a way that $D$ doesn't know which $key:value$ pair comes from which $S_i$. My idea was that each $S_i$ would encrypt its l...
I would like to know what $O(v(n))$ really means in detailed and simple words please. I found it everywhere in the literature I am reviewing but I cannot find what the intuition of it (especially if it means the Big O Notation, then what it has to do with the Probability here; also what is $v$, it is never defined exce...
Suppose I want to choose a random element from a list of size $2^n$, for any integer $n$. (Here, random is to mean an equal probability of selecting every item.) My intuition says I'd need $n$ bits of entropy. For example, for a list of size 64, I'd need 6 bits of entropy. However, how many bits of entropy would I nee...
I read somewhere that the complexity of solving a Linear $n\times n$ system over a Finite Field $\Bbb F_q$ using Gaussian Elimination is $\mathcal{O}(n^3)$ operations in $\Bbb F_q$. What's the role of $\Bbb F_q$ here in the complexity? Also, what's the cost of this algorithm in terms of $q$ and $n$?
If computationally unbounded parties $A$ and $B$ have only a noiseless channel between them, why is information-theoretic oblivious transfer impossible even for the passive cheating setting? Intuitively, the noiseless channel makes the views of $A$ and $B$ almost identical except for the private randomness that $A$ and...
I've been reading a little bit about cryptanalysis, and I'm wondering how attacking algorithms that work on keys is performed. It's obvious how algorithms like MD5 are attacked, in pseudocode: hashed = 'blablabla' while guess != hashed: guess = md5(inc(guess)) print('{hashed} is {guess}') But I can't see how you'd...
At first I thought the new ratchet key is created with each first incoming message. After that I believed it depends on the implementation. But after closer look at the signal documentation and following picture, I am left even more confused. The picture above shows Alice sending message A2 and after that receiving me...
Is there any code available online for the chaos-based hash algorithm CHA-1? I am trying to apply the methodology of this paper to blockchain applications.
I am attempting to implement a Key Based Key Derivation Function (KBKDF) in Counter Mode as part of a larger project. To test my implementation, I was directed towards the Verification System for this function (KBKDFVS) by this helpful question & answer. I intended to generate tests for my code based on the full vector...
so to prouve a value $v$ is in range $[0,2n−1]$ we convince the verifier that $v$ is represented by a binary vector $a∈\{0,1\}^n$ so that $<a,2n>=v$ $//$ $2n∈Zn$ is the vector of powers of $2$ satch that $2n={2^0,2^1,2^2,,,,,2^n}$ we have $r∈Zn$ a random vector for blinding we also have $G$ an eleptice curve generator ...
I'm trying to understand white paper about BIKE Asymmetric crypt. And actually read about the inverse matrix that needs to be produced for decryption. My concern is: Can I actually encrypt data with private key and decrypt with public key instead too? If so, there are 3 Versions of BIKE: "BIKE-1, BIKE-2, BIKE-3" Which ...
First of all excuse me for my inexperience on the topic (I am new to cryptography). I am currently studying for my Master thesis and am am looking for hash function on which I can modify them so thy can be dynamical (meaning the method on which the algorithm is processed is changing on different conditions) by using ch...
Both of them are just SHA-512 with different IV's and truncation. What's the point of having 2 of them? (Actually we have 3 of them as SHA-512/224 is the exact same thing.)
In my Rust implementation of a messaging system, I'm using currently two cryptographic primitives: ed25519_dalek and x25519_dalek. I use ed25519_dalek for DSA, while x25519_dalek for encryption of the message since I need to do a Diffie-Hellman key exchange. I wonder whether I could use the same primitive for both DSA ...
If I have two secp256k1 private keys and add them together, can I derive the public key for the sum, if I only know the public keys for the two original private keys? (I think this may be the core of understanding bip32.)
In the search to decision reduction of 'On Ideal Lattices and Learning with Errors over Rings', the authors implicitly use the fact that the difference of distinct, uniformly random elements of a (finite) field is again uniformly random (Lemma 5.9). This is again used in the reductions of 'Worst-case to Average-case Re...
In the answer for Is it possible to subtract/multiply numbers using homomorphic encryption? it says: To add two encrypted numbers, one could use Benaloh, Damgård–Jurik, or several other known partially homomorphic cryptosystems. (Many of these "addition-only" cryptosystems can also be tweaked to support subtraction. ...
In ciphertext only attack, if I assume that the ciphertext is obtained by an OTP, then for a short length of ciphertext I can search over a random keystream of the same length and discover a plaintext which is meaningful, say in the language of the plaintext. Hence I get a most probable plaintext/ciphertext pair. This ...
I'm writing something where somebody wants to have a ridiculously strong password for a file and yet be sure that he will always be able to reconstruct it. The way I have thought of this might be a little cumbersome, but as long as it works and makes sense, I'm happy with it. First I'll explain how my character derives...
I read this in a description of Linear Shift Feedback Registers Note that the allzero state must be excluded. If an LFSR assumes this state, it will get “stuck” in it, i.e., it will never be able to leave it again". I can understand why an all zero state means that if the LFSR comes to an all zero state, it gets stuc...
I have the following: complete ciphertext; iv; last block of plaintext including the padding which is 04040404. The encryption was made using AES-CBC-256. I can find the intermediate block by XOR-ing C2 with P3 I cannot use padding oracle because there is no server to validate padding. I didn't find any help about pl...
While playing around with creating an RSA public key, and decoding it using a home brew ASN.1 decoder, I ran into the fact that the public key is BITWRAP-ed. BITWRAP seems to be an OpenSSL modifier, and I wonder why it is needed, what the rationale is? This page describes what BITWRAP is but not why it is needed. Why c...
Disclaimer: I am neither an electronics engineer nor am I a mathematician. I understand what an LFSR is. I can derive the periodic sequence if an LFSR is described by it's taps. My question is - why are LFSRs represented as polynomials? What is the advantage of representing taps as x^n? What is the x? What is the const...
I'm developing an IoT system that uses small nodes connected through RF. This allows messages under 250 bytes long. You can check it at https://github.com/gmag11/EnigmaIOT. All messages are encrypted using ChaCha20+Poly with a dynamic key obtained using DiffieHellman algorithm. But first association is only protected w...
I got specific problem with round function in my symmetric cipher. It works on $128$-bit blocks. Every round got two $128$-bit keys. Block is xored with $k_{1}$ on the beggining of the round. Then it goes into round function (which is using the same $k_{1}$ and $k_{2}$ keys, both $128$-bit long). And then it is xored w...
I'm studying RSA for the first time, and I know that $p$ and $q$ must be kept secret because with them we can calculate $\phi(n)$, which then lets us calculate the private key $d$. So $p$, $q$, and $\phi(n)$ are all kept secret. Is there any reason we'd want to find $p$ and $q$ by working from the definition of $\phi(n...
It is often suggested that hashing of long character columns can be used for indexing in databases, but the possibility of collisions is an issue for Unique indexes. Whilst I know that both MD5 and SHA-256 can (rarely) produce collisions, I was wondering what the possibility of them both clashing at the same point with...
Suppose my very trusting friend has a bitcoin private key with a large balance (let's say $1B USD worth of Bitcoin) and wishes to keep a backup copy with me as a trustee. He doesn't want to transfer the raw key over an internet connection for obvious reasons, so he asks me to generate an RSA key and send him the public...
I am working on encryption/decryption for the rest of the API. The client here can be mobile, desktop, web browsers, etc and all the requests will be made to an https endpoint. The main goal here is that the encryption/decryption has to be performed in client-side applications. The user himself should not be able to mo...
If yes, is there any paper that proves it? Unifying Zero-Knowledge Proofs of Knowledge, by Ueli Maurer, argues that Schnorr's interactive protocol is zero-knowledge. If this is true, using the Fiat-Shamir transform, can we convert Schnorr's protocol into a NIZK proof?
I have PII in my logs that I would like to replace with hashes (e.g. sha3-256(salt + email)). The idea is that I can always go back to my logs and find all the log lines with that email address, by searching on the hash result of sha3-256(salt + email). How hard would it be for folks to retrieve the original email addr...
I have a key $k$ which is $192$ bytes long. Is there a secure way to first compress this key into $16$ or $32$ bytes, but in such a way that later given those $16$ ($32$) bytes I can use a key derivation function in order to recover the full $192$ bytes $k$?
I'm looking through the lattice trapdoor construction in https://eprint.iacr.org/2011/501. To summarize, assume we have a matrix $G$ where, on input $b$, we can efficiently find $(s,e)$ such that $s^TG+e^T=b^T$. Then for an invertible $H$, and a random $\overline{A}$, we produce a matrix $A$ by $$ A = [\overline{A} | ...
It is a basic theorem of cryptography that it is impossible to have a perfectly secure public-key encryption scheme. That’s because the adversary can search through all possible private keys. But I’m wondering if it can be made possible using oracles. My question is, do there exist sets of natural numbers $A$ and $B$...
I came across the following statement regarding true random number generators (TRNG): A “P1 medium” [AIS31] true random number generator (TRNG) may not be directly used due to cryptographic reasons. Even smart cards or other advanced security solutions which possess high-quality physical sources of randomness usually r...
I'm aware of attacks extracting information via timing and volume. But none that care or attack the actual cryptographic algorithm implementation or end up extracting the key. Seeking examples if any for such attacks which happened outside the lab, Or evidence where we suspect this was the means of attack used. Any sid...
Let's say we have two secure block ciphers FOO and BAR. Will a new block cipher built by combining them into a single new block cipher result in any insecurity? $$\begin{align} \operatorname{BAZ}_K(x)&=\operatorname{FOO}_K(\operatorname{BAR}_K(x))\\ \operatorname{BAZ}^{-1}_K(x)&=\operatorname{BAR}^{-1}_K(\operatorname{...
I read papers about cloud storage data integrity audit, which needs PBC library and GMP library. The author define encryption hash function $H:\{0,1\}^* \times G \times \{0,1\}^* \to \Bbb Z_q$, used as $H(ID,R,RN) \bmod q$, $G$ is a cyclic multiplicative group with order $q$ ,$q$ is a large prime, $R, ID,RN$ are eleme...
From Wikipedia: XTS mode is susceptible to data manipulation and tampering, and applications must employ measures to detect modifications of data if manipulation and tampering is a concern: "...since there are no authentication tags then any ciphertext (original or modified by attacker) will be decrypted as some plain...
Even the up to date RFC 8446 lists at the page 41 as the options for the ECDSA in e.g. TLS_ECDHE_ECDSA_WITH_... only NIST curves: /* ECDSA algorithms */ ecdsa_secp256r1_sha256(0x0403), ecdsa_secp384r1_sha384(0x0503), ecdsa_secp521r1_sha512(0x0603), Does it mean that the certificates containing ...
The following Forward Errors Correcting FEC is used in our daily devices. But I added a potential security measure. In one of FEC systems the input is $K$ bits and the output code is $M$ bits where $M=3K$. The legitimate user at the other end uses FEC decoder to get the correct $K$ bits. The proposed security is that i...
what is the security of an encryption algorithm that takes the key schedule of algorithm X and the round function of algorithm Y? should it need a new security proof? or it relies on X and Y's security?
Suppose we have an $n$ bit ciphertext $c$ protected by a $k$ bit $MAC$, with $k < n$. Generally, we expect collisions after $O(2^{k/2})$ ciphertext/MAC pairs are seen. Consider the following modifcation: Adversary chooses $m \in \{0, 1\}^n$ and sends to oracle. Oracle sends back $\sigma((c) || MAC(c))$, where $c=E(m)$...
ZK set membership: I am trying to create my own zero knowledge set membership proof for a commitment to an element in the set for small sets. I am a beginner in such works, so can someone help me find if there are some flaws. It goes like this: Public parameters (p,q,s,g,m): p,q and s are prime numbers such that p-1 ha...
I read a cryptography scheme that it include the following operation: $$c= H(e(g_1,g_n)^t)$$ where H is a hash function. I need to know what the operation $e$ means.
I am looking at a proprietary signature scheme used in production. It involves a short Weierstrass curve $E_{\mathcal{W}}:y^2=x^3+ax+b$ in the prime field $\mathbb{F}_p$. The parameters are set up such that $E_{\mathcal{W}}$ is always expressible as a Montgomery curve $E_{\mathcal{M}}:y^2=x^3+x$ (i.e. $a_{\mathcal{W}}=...
I'm wondering about the concept of image hashing specifically SHA256. Like how do we do it? Can we hash the image based on the binary file? or do we need to convert the data into strings first then do normal hashing? Are there any other ways on how to hash images in C++? without using any libraries?
I'm looking through the test and examples of libsnark, let's take for example here: https://github.com/christianlundkvist/libsnark-tutorial/blob/master/src/test-gadget.cpp at line 19 there's: default_r1cs_ppzksnark_pp::init_public_params(); Is this the step that generates the toxic waste? If so, then the same prot...
I'm working on a problem where I provide an 8 digit integer and a 16 digit integer, then a 10 digit integer response is produced. For example 12345678 and 1234123412341234 produces 138259849 The same inputs always produce the same output. Is it possible to find the algorithm used to calculate the response?
I've been studying decryption mixnets, in the context of e-voting and stealth networks. Let's describe it in a very simplified way. The concept is pretty simple. A message M is forwarded through several servers, A,B,C. The user encrypts the message with the public key of C, then encrypts that output with B's key, and t...
Since $\pi$ and other numbers repeat could you use them as a OPT key. Ex: a 5 character message is sent and the first 5 digits of $\pi$ are used. after that the next $X$ number of digits are used and so on. from what I understand of Cryptography (its my hyper fixation for the week) and potential 3rd party readers would...
I know for a fact that CTR random is IND-CPA secure due to if an adversary want to break it, it will have to run a long loop where the $$\mathit{Adv}^{ind-cpa}_{CTR~random} = C(2^{n},q) - 0$$ However, if we change the encryption to something where in the beginning a random $IV$ is picked from the space $\{0, 1, 2, .......
Im reading about FHE and the libraries implementing it (SEAL, HELib). I saw that SEAL doesn't support bitwise operations but I wondered if its theoretically feasible. For example, bitwise-ing XOR an encrypted value with itself, gets us an encrypted 0. Bitwise it with the not of itself to get an encrypted 1. Using shift...
How to show there is no secure protocol to compute OR? I need to know the mathematical proof of this statement. I am understanding this statement using the matrix representation of $f(x,y)$ but unable to think mathematically. I only need a few hints to prove it.
Context We need to generate a key pair in order to perform DH key exchange with the other party. Some suggest to use a KMI solution (think: AWS KMS or like) in order to generate the key pair. Questions What would be the benefits of using a separate KMI solution to generate key pair for DH key exchange? Are there any b...
I'm following these three articles: Kleptography: Using Cryptography Against Cryptography, Kleptographic Attack on Elliptic Curve Based Cryptographic Protocols and Elliptic Curve Kleptography . In the first article, a kleptographic attack based on a DLP cryptosystem is described. In particular, we can read (pg 67) th...
I want to prove the EUF-CMA-security of a signature scheme. It is a variation on an established scheme, therefore I would ideally like to reduce the new-scheme-security to the old-scheme-security. the (very abstract) construction Let the old scheme be called S and let k denote a number. In S, k is fixed, say k=5. Imagi...
I'm trying to understand the following equality found in a paper of quantum key distribution Fully device independent quantum key distribution : $$a \oplus b = x \wedge y$$ As far as I know; $\oplus$ stands for lofic X-OR $\wedge$ stands for logic AND Using integers from a specific set $\{0,1\}$, how the above mentio...
I am trying to script the integrity check of a VeraCrypt volume. #! /bin/sh red=$'\e[1;31m' end=$'\e[0m' set -e printf "Please enter password: " read -s p if [ -f "/Volumes/Samsung BAR/bar.hmac" ]; then printf "\n%s" "Checking integrity..." if [ "$(openssl dgst -sha512 -hmac "$p" "/Volumes/Samsung BAR/bar")" !...
Assume Alice has a key pair $(A, a)$ and Bob has a key pair $(B, b)$, where $A = Ga$ and $B = Gb$. In general, the basic rule of crypto says that we should not use the same key for different operations, like in signing and encryption, but I wonder whether in my use case it would be actually possible to use it. Below, I...
I am having trouble figuring out how long it takes to decrypt a 64-bit key, given that a computer can do 1 billion trials per second. I know that there are $2^{64} = 1.844 \times 10^{19}$ possible keys for this key size, but then how do I go about figuring out the rest? If there is a formula for this, I would be very c...
Hy! I want to use an EC key for ECDH and ECDSA too. Using the same key does compromise the security of the key in a cryptographic / mathematical sense? I read a lot in this theme, but I found nothing exact. I know that the usage of the same key for encryption and for signing is not recommended (because of encryption ke...
GPG2 does not provide authentication. It still uses SHA-1 by default. It does not seem to get any stronger as time goes by. If one were to pass a randomly-generated symmetric key (from a TRNG) over the entire encypted and signed GPG data block + HMAC of that GPG data block would there be any advantage, by a computional...
We are contemplating hiding a sensitive information from our business partner by encrypting it. However, customers have access to both the sensitive and the encrypted information. Furthermore, they can influence the 'sensitive information' to their liking. I am curious which security algorithms are sensitive to an atta...