instruction
stringlengths
32
27.2k
Although this question is strongly related to my previous question, it's certainly not the same: Suppose the input of SHA-512 is 512 bits of data (so exactly the same size as the output). If I would test every possible permutation (so $2^{512}$ calculations), then will the output also be exactly $2^{512}$ different has...
this is from an IT Security exercise which my friend and me cannot solve. Given 2 AES-CTR stream-cipher encrypted files Same known initalizing vector Same (unkown) key Same 128bit Counter initialized with 0 Files are .png so there is known plain text in both files (the file header) Our approach was to use the known e...
The result from a primitive root mod n seemly has a uniform distribution over n, is it true? For instance, 3 is a primitive root mod 7, and the result seems to be randomly distributed over 1 and 6, I wonder why is it, or should I just take it as a basic fact of our universe?
For a PKE scheme $(Gen, Enc, Dec)$, the most 'obvious' idea is to commit to an encryption of a bit and in the reveal phase maybe send $r_g$, $r_e$ where $r_g$ is the randomness of $Gen$ and $r_e$ is the randomness of $Enc$. However, if the encryption scheme is not perfectly correct, then maybe there is some $sk, sk'$ s...
In "Universal Accumulators with Efficient Nonmembership Proofs" by Jiangtao Li1, Ninghui Li2, and Rui Xue3 section "How to compute witness with the auxiliary information" the authors write: "The membership witness and nonmembership witness can be computed efficiently given the auxiliary information $aux_f$. Suppose the...
I am studying the RSA algorithm. If for example the plaintext $m$ has some relationship with prime $p$, let's say $m$ is multiple of $p$ (where $p$ is the $p$ in $n=p \times q$). Can this give an attacker some information given we know ciphertext $y$ and public key?
So everyone seems to agree that recurring round keys in a Feistel network (eg. using the same key for every round) are a massive security leak. When researching this, the only thing I found is the Slide Attack (https://en.wikipedia.org/wiki/Slide_attack), in which a slid pair is found, which can be used as a plaintext-...
I was wondering if we take just 256 bits of plain text and simply XOR every bit with a 256 bit key, how strong can it be ?
Can we consider the Scytale a block cipher ? If yes why ? Can you tell me ?
Paul Christiano writes (source): I’ll assume that we have some 256 bit cryptographic hash function F [...] The first important observation is that a 256-bit shared secret allows Alice and Bob to talk for as long as they want, by just using their secret to create a new pseudorandom pad for each message. That is, if Ali...
I'm having a bit of trouble understanding the translation of affine coordinates to projective coordinates in Montgomery curve ECM. Would be very thankful if someone could explain it by expanding the derivation. From: Speeding the Pollard and Elliptic Curve Methods of Factorization page: 261. $$\begin{equation}\t...
I have a simple question about basic math. When I read different papers bout ABE, I see different methods to choose a random exponent. What is the difference between the following options? Choose a random exponent $\,a \in \mathbb Z_p$. Choose a random exponent $\,a \in_{\small R} \mathbb Z_p$. Choose a random exponen...
I'm reading "Fully Homomorphic Encryption over the Integers"——the first generation of FHE. However, this paper seems to detail a scheme to encrypt each bit in a message. I'm very confused about how to implement homomorphic encryption of the whole k-bits message. More specifically, if I want to achieve homomorphic addi...
I am trying to find the sub keys of a FEAL-4 cipher. I am able to get a number of possibilities for $K_0$ after using Michael Stamps formula using a as a constant and going through $2^{32}$ keys. The problem is that I don't know what to do next as it isn't in any of the literature. Stamps formula for a constant is $$...
I've read in DigitalOcean article about SSH that in order for a server to authenticate a client: The server sends the client this encrypted message. If the client actually has the associated private key, it will be able to decrypt the message using that key, revealing the original number. But wasn't it enough for t...
The title explains it. How does AES-GCM (or other modes for that matter) generate random ciphertexts per execution, and how does the algorithm decrypt a random value since the sender randomizes the ciphertext?
Is there a way to do anonymous encryption to a recipient's Public key, where the only way to open a message would be to decrypt with your own private key + passphrase?
Imagine that public-key crypto stops working. Are there any academic proposals out there that would explain how we could implement commercially viable secure communication based on the current infrastructure and symmetric key crypto? Inspired by this post.
I am a beginner to cryptography and I have the following question. I know that to extract plaintext from a mono-alphabetic substitution cipher I can perform shifting the characters by $n$ times until I have the plaintext, or I can also use the frequency letter analysis. However, by doing this I'm getting only the plain...
I am doing some research on differential cryptanalysis. Most people who are familiar with that cryptanalysis technique do know the tutorial from Heys (Heys Tutorial). I came currently to the question, why is the in the final round no permutation, as in the other rounds? Heys says in the tutorial, that there would no pu...
(TL;DR at the end) Let's say the plaintext hello is encrypted with AES (CFB mode). I noticed that decryption works no matter the given password! Of course if the password is wrong, the output will be garbage, but no error will be thrown (example in Python): import Crypto, Crypto.Random, Crypto.Hash, Crypto.Cipher.AES p...
It is my understanding that EdDSA uses a slight variant of Curve25519 (typically used for ECDH), called Ed25519. Given the same private key, are the differences between the two algorithms enough to make the resulting public keys different between X25519 and Ed25519? In other words, if I'm writing code to generate priva...
I'm analyzing a binary which for its AES encryption, its only calling aeskeygenassist once and for the last argument (imm8, the round) its sending static value of 0x46. Does this mean its using only one round of AES key derivation? Does this make the crypto implementation vulnerable? If yes, how? How can we recover t...
I've been learning about lattice cryptography and have noticed that most resources such as this survey by Chris Peikart, the Winter School on Lattice Cryptography etc don't include material on LPN, and typically only discuss SIS and LWE. According to this post, Are LPN and LWE problems equivalent?, LWE is a generalizat...
It's an unfortunate fact that, right now (2019), browsers don't expose standardized streaming hashing interfaces in SubtleCrypto. The only way to hash a file, is to load it into an ArrayBuffer in its entirety, which for large files, this could be prohibitvely costly memory-wise. To get around it, I'm thinking of build...
I mistakenly thought that RSA keys could only be powers of two(1024, 2048, 4096 etc.) but a few days ago read about a 1536-bit and 1160-bit RSA key. I am wondering is it possible to have an RSA key of any bit length?(e.g 1025-bit RSA key, 1234-bit RSA key etc.) thank you.
Can anyone explain to me what the difference is between a hash chain, transaction chain and a blockchain?
During the encryption process in NTRU, a random polynomial $r$ of small coefficients is generated to bind to the message to obscure it, and this polynomial must be kept secret. Does this polynomial have to be unique per message?
I'm struggling to implement AES256-GCM on a Linux machine to encrypt files outgoing to another party. We're usually exchanging files using PKI, but this particular party insists on AES256-GCM and will not allow PKI. However, I've been struggling to make it work. We'd like to implement it on a Linux machine and to be ab...
Would it be possible to create a signature scheme like this: $ \DeclareMathOperator{Gen}{Gen_{\Mac}} \DeclareMathOperator{Mac}{Mac} \DeclareMathOperator{Sign}{Sign} \DeclareMathOperator{F}{F} \DeclareMathOperator{H}{H} $ $$k_d = \Gen$$ $$m_d = \Mac(k_d, M)$$ $$S = \big(k_d, \Sign(K_{priv}, m_d)\big)$$ So instead of a h...
As the title states; Is there any risk from encrypting the key with itself? EG. $C = AES(K=K, M=K)$ I'd assume not; after all, how does having the key for a safe inside the safe make it easier to pick the lock?
Suppose you want to transmit bytes of a file from computer a to b, but you want to bail early if any of the bytes are wrong. It’s easy to prescribe a hash/checksum implementation for the entire file. For example, sha-256 is probably sufficient and only requires 256 extra bits to be transmitted, and for any file of sign...
I'm looking for a type of asymmetric and symmetric encryption that I can crack fairly easily for a school project. I'm looking to compare the difference between asymmetric and symmetric encryption. I have a VPS with (I 8GB of RAM and an Intel Xeon if that helps. Preferably it should take no more than 8-10 hours to cra...
This isn't a deep technical question, but I feel like this is a good place to ask. Modern cryptography generally rely on statistical chances of collisions according to current computing powers. Are there any known cases where someone was lucky and cryptography was broken? Also, would it be an interesting thing to do to...
First of all I want to say that I have exactly 0 knowledge how I can write something in Python. But I have some knowledge in math especially finite fields. That's why I want to learn more in writing tools for a Project. This is the list what the tool should do: generating random private keys. in a range ( which I can ...
I am examining the SPAKE2+ protocol introduced in Chapter 9 of a paper called The Twin Diffie-Hellman Problem and Applications. I noticing the use of a lot of syntax that looks like exponents. I am just becoming familiar with the mathematics behind the Diffie-Hellman protocol so forgive my ignorance, but does this impl...
I was reading Oblivious Transfer (Wikipedia) and the 1-2 oblivious transfer. I was confused why RSA was needed. Why wouldn't this work?: A:m1, m0 A:x1, x2 -> B B:k, b B:Xb+k -> v -> A A:Xb+k-X1, Xb+k-X2 -> k1, k2 A:m0+k0, m1+k1 -> m'1, m'2 -> B B:m'b-k -> mb
Background I am a novice in the field of cryptography and cyber-security, and while studying asymmetric-key encryption, I learned about the potential of a man-in-the-middle attack. To mitigate this threat, people came up with certificate authorities that essentially "vouches" for the trust of 3rd parties by supplying y...
when we say that HSM stores keys securely we mean that non-authoriszed requester cannot access the keys. but the key is stored physically anyway in the hardware, so access is still possible if the keys are encrypted, that means that there is another key in the hardware that encrypted those keys. this key is not encryp...
Assume there is a global message board, that people use to send messages to other people. Of course no one else but the receiver should know the content of the message, so senders use asymmetric cryptography to encrypt the message for the receiver. To determine if a message on the board was meant for me, I could try to...
I am using AES/CTR/NoPadding to encrypt while downloading files in one of my application. The encryption is done along with downloading. When the internet is not available in the middle of downloading, I need to pause the download and resume it when the network is available. Since the iv gets initialised to 0 state on ...
My prof said that the last round of the AES algorithm doesn't use the MixedColumns layer, yet this doesn't decrease security. If so, why the MC layer is used in the other rounds?
Can someone explain why does probability is equal $2^{-224}$ in the following piece of paper? The length of messages blocks in Hamsi is equal 32 and the length of chaining values is equal 256.
From the cryptographic hardness assumptions, we have DDH and CDR assumptions. It is known that the composite decisional residuosity assumption is related to a factoring problem, while the DDH is related to a discrete logarithm problem. I need to know if there is a method or a mathematical theorems that can provide way...
I am reading Junod's paper about the Blum-Blum-Shub generator. There is one thing I just do not understand about his proof of Lemma 4. On page 17 he writes: We conclude that $x=-x_0$ and from Lemma 1 we know that $x \ne x_0$ (So far I understand.) , so they must have different parities (Why is this the case?), $n$ be...
My understanding is that $a=g^x\bmod p$ is the discrete logarithm problem. Given the question is worded this way, are we trying to find $x=\log_g a\bmod p$ ? For instance, if we are trying to compute the discrete logarithm of $3$ to base $2$ - given that $p=11$, what would be the output (or the equation) How would we ...
I have read about conflicting information about the roles of public/private keys. In one article(Asymmetrical-key algorithms), it says: Simply put each party, say Alice, picks a private random value, inputs this into a key generation program, and receives two keys. It is arbitrary which of these is made public and...
in the this paper,section 3,autors attack hamsi-256. Im trying to make a parametrized version, so i need to understand how do they estimate the complexity of attack in bit operations,that reads as followed Can anybody say why they dont count number of operations to generate a tree with $2^{224}$ leaves,and why is th...
In most uses of Sponge mode of operations such as SHA3 and many of the round-2 candidates in the NIST lightweight cryptography project, the underlaying primitive is a cryptographic permutation - that is, it's bijective. For reasons of curiosity, I noticed that a proposed Sponge-based PRNG implement forward secrecy (ba...
I have generated a certificate using openssl with the below command. openssl ecparam -out <output_file> -name secp256r1 -genkey What would be the RNG used in this case? and is it cryptographically secure?
Let $Y = xG$ be a point on an elliptic curve, $G$ the generator point and $x$ a scalar. Without knowing $x$, is it possible to calculate $x^nG$, being $n$ a natural number?
when i was reading the latest source code of openssl, i found openssl enc has an 8-byte (64-bit) salt length; because the same (password, salt, iter) will generate the same (key, iv), birthday paradox tells that you may reuse a (key, iv) pair within about 2^32 encryptions; openssl source: // apps/enc.c; int enc_main(i...
I have a 128 bit AES cipher in CBC Mode with the IV prepended to the message. I am aware of the security issues here, but that is exactly the point of my example. I would like to change the plain text message via bit-flipping, which I have partially implemented in the example below: from Crypto.Cipher import AES from C...
In the SecureML paper, one can assume that two non-colluding servers can run secure two-party computation protocol based on secret sharing with the help of a third party (client). The client would send correlated randomness to the servers in offline phase, which can accelerate the computation in online phase, e.g. mult...
how to evaluate the security of transposition ciphers? I am specifically interested in the security of turning grilles and how to (mathematically) evaluate their security. I would appreciate any help.
Recently I'm working with a chinese vendor for POS devices and their devices use 2048bit RSA keys for signing binaries. I had to generate a public/private pair (so I can sign my own binaries) and I did some research about this. During the research I came across a recomendation from vendor's documentation: please, check...
From what I understand, we can arbitrarily choose an exponent e as long as $\gcd(e,\phi(n)) =1$. But what is the most appropriate choice for it? Should it be small compared to $\phi(n)$ or approach it?
suppose there is a router with limited storage but good network connection; it could be a good worker for deterministic authenticated encryption on streams; that means it receives data from another machine, encrypts and sends it back; however, siv algorithms need to calculate iv over the entire plaintext before that iv...
I am doing an error propagation experiment with the CBC mode.I have encrypted a 100 byte text file with openssl. I made the 55th bytes of my encrypted file corrupted.As per theory the corresponding block of 49-64 bytes and the subsequent block of 65-80 bytes should be affected on decryption.But I am only getting the 49...
I am asking myself the following question: Say Alice sets all things up so that she is the reciever in an RSA-system. What do you call this "network" now? I hope it is clear what I mean. I sincerely do not know the correct word for that. I could think of something like: RSA-channel RSA-network Could you please tell...
I've been trying to find out how the keystream in AES-CTR is generated, but I can't actually figure it out. Wikipedia and any other sites that "explain" it just say the nonce is padded with the counter and encrypted with the key... So how does it actually work? (As nitty gritty as possible please)
Let's consider a random variable X that can produce the output $c$ with probability $1/4$. I was told that $-\log_{2}(\frac{1}{4})$ represents the number of bits needed to represent $c$. But, imagine that X can produce the output $c$ with probability $1/4$ and the output $b$ with probability $3/4$, then I only need $1$...
There are several and several attacks on A5/1 Cryptosystem, but most of them are impractical. In 2008, Elad Barkan , Eli Biham and Nathan Keller release a practical attack on GSM. Is there any production of the attack? In another words, does exist any physical production that gets ciphertext as input and get Key or Pla...
I am doing a CTF and I came across a challenge I do not know how to solve. We are given a key generator and asked to find a way to factor the keys $N = pq$ it generates. The intended way is to disassemble the executable and see what it is doing. I haven't gotten far with that method given I can't read assembly. However...
how do I calculate the expected value of a brute-force-attack on a transposition cipher? For example, for the text "HELLO", there are 5! = 120 possibilities. Is the expected value to break the transposition cipher with brute-force therefore 120? Or is it 120/2 = 60? Or something else?
In the lets-choose-the-next-aes contest in 1998, they chose Rijndael because of speed. Now, not taking speed into account, is Serpent more secure or not? Since it has 32 rounds (of course that's not that useful if the round algorithm isn't secure,) I thought it's more secure, since it has the same block size, key sizes...
Alice and Bob want to exchange keys, Alice sends his half (the public key of the ephemeral key pair) signed with his private key and makes the public key available. Eve is bridging the connection so he intercepts the message uses the public key and verifies the half. He then sends his half to Alice signed and establis...
This pseudo-random number generator uses only XOR and Mid-Square operations: Get one secret 128-bit truly random seed $R_0$ Generate a million secret $R_j$ by the recurrences (for $1\le j\le 1000000$) $X_j=\lfloor{R_{j-1}}^2/2^{64}\rfloor\bmod2^{128}$ $R_j=X_j\oplus R_0$ Output $R_j\oplus R_{j-1}$ only for $j>16$ ...
I am struggling to prove this claim: I proved that the map $x\mapsto x^3+1$ is a bijection from $\mathbb{F}_p$ to itself if we have that $p\equiv 2\bmod{3}$. We have to use this fact to prove that the elliptic curve $E:y^2=x^3+1$ over $\mathbb{F}_p$ contains precisely $p+1$ points. I don't understand how many points w...
I am looking through this paper and am trying to understand the proofs better. One of the theorems the authors are proving (Theorem 5.1) contains syntax of Adv followed by "cdh" in the superscript and some values as parameters within parentheses after. I've posted an image of the theorem in question for convenience. Wh...
Purely theoretically. I know it's a bad idea to try to invent your own encryption and that's not the intention here. Just a thought experiment. Say, I change some or all of the magic numbers used in, say, AES (but this would also apply to other algorithms) and create "AES-RobIII". Of course, this would be incompatible ...
Background I am an undergraduate novice learning about cryptography. Recently my professor introduced us to the concept of a "One time pad". According to my professor: A one time pad is a cipher that exists when one unique key is used once to encipher/decipher one message. It is also the only genuinely unbreakabl...
There is a version of LWE assumption as follow. Assume that there is a positive number $n$, an integer $q = q(n) \geq 2$, an error distribution $\chi = \chi_{n}$, a vector $\mathrm{\mathbf{s}} \gets \mathbb{Z}_{q}^{n}$ and for every efficient algorithm $\mathcal{A}$, $$\Pr \left[ A \gets \mathbb{Z}_{q}^{m \times n}, \m...
I'm trying to implement mutual authentication for a TLS connection between a server (ONOS OpenFlow controller) and multiple clients (OpenFlow switches). I'm restricted in that I must create a single firmware image that will be pushed to the switches and the switches must not be manually configured after that. Tradition...
Most basic explanations of asymmetric encryption proceed as follows: Bob wants to send encrypted message to Alice. Bob and Alice each generate public/private key pairs. Bob gets Alice's public key and "encrypts the message". I have always assumed that Bob used Alice's public key and his own private key to encrypt t...
how to break a transposition cipher, especially a turning-grille-cipher? For example: $\begin{array}{rrrrrr} T & E &R& E & W& E \\ E & E& & N & P & Q \\ T& U & I & A& G & H \\ Y & - & L &...
I think this should be a simple question and I might be missing something fairly fundamental, but I haven't been able to find the answer. Basically, suppose there are parties $A$ and $B$. Party $A$ gets a secret input $s$. Party $B$ has no input. They wish to securely compute the function $f(s) = (\bot, \bot)$ so nobod...
I have seen your example about ecdlp solver :The Problem is as follows: $$E\backslash GF(p):y^2=x^3+17230x+22699$$ where $p=23981$, point $G$ with prime order $|G| = 109$ Alice creates a public key by selecting a private key $d<q$, public key $Q=[d]G = (3141,12767)$ Therefore; public information : $a,b,p,G,q,Q$ priva...
Is it possible that a client which gets the Digital certificate of the Server during the TLS handshake then acts as a server? Because a server only needs to have a valid digital certificate which it already possesses.
It is my understanding that PRNGs typically use a seed and can then generate random values one after the other. This is what I mean by being 'sequential'. How about a PRNG which allows me to retrieve e.g. the third value, without computing the first and second? Basically, I'm looking for a function $g: \mathbb{N} \righ...
I have been searching many websites for source code of AES whether it is ECB, CBC, CTR or any other method but can't find any. Can anyone please help me in getting the source code? I have to implement timing analysis on that code to see whether the code is leaky or non-leaky.
(a) Briefly explain the following round transformations of AES Encryption. Please indicate if it helps diffusion or confusion or both. SubBytes ShiftRows MixColumns AddRoundKey (b) Suppose you are computing one round of AES. In MixColums step, one row of your input is 21A07C3D. Compute the multiplication of 03010102 by...
In some papers I'm looking at there is some language that says things like "Choose a random number in the order of prime q" and I see some syntax that it is referring to that looks s = Zq (where q is a subscript). What does it mean for a number to be "in the order of" some prime? For context, the paper I am reading is ...
How to derive a 4096 bit or 8192 bit RSA private key from a (BIP39) mnemonic seed? Any tool available for this?
Google is advertising the use of Envelope Encryption in their products with their KMS. By the description, it sounds very much like Hybrid Encryption. But since I could not find any reference to Hybrid Encryption, I wonder if there might be a difference in the idea behind it. Source: https://cloud.google.com/kms/docs/e...
Consider the following definition from section 2.2 of this research paper We write $\mathcal{P}()$ for the power set of the set $$. An $-$partition $Ω=\{_1,\cdots,_\}$ of a set $$ is a disjoint family of $$ nonempty subsets of $$ with $=_1∪ \cdots ∪ _$. Let $Λ⊆\mathcal{P}()$ be a family of subsets of $$. For a permuta...
My encryption function is some permutation using a permutation key. An input to the encryption function is encoding of my plain text where one plaintext is mapped to many encodings. Can we prove semantic security of this encryption? If so how? Can any one please help me out? Note: Both Plaintext and its encoding are bi...
Imagine the following scenario. A process is running in background and permanently encrypting some data. An adversary has full control of the process, e.g. it can dump the process memory any time and read the symmetric key. It is essential that the adversary cannot decrypt the data, therefore only public-key encryption...
Encrypting with AES-256 is widely claimed to be post-quantum secure. But let's take a case where you use an initial key that has less than 256 bits of real entropy. In this example, let's work with a 128-bit key that has 128 bits of real entropy. We stretch it with something commonly used, like PBKDF2 with 120,000 iter...
As far I know, the Serpent cipher is the only cipher that uses legit bit shifts (<<) along with circular left shift (<<<) (correct me if I am wrong). I have two questions on it: What security advantage added by bit shift? Why is it used in the first place? Does the bit shift add vulnerability in differential power ...
I was reading a paper that shows time complexity of Trial division + Miller-rabin test for creating prime number. T = N(T_rnd + T_td + T_mr) T_rnd denotes time for making rnd number, T_td denotes time for trial division, and T_mr denotes time for Miller-rabin test. N denotes the number of r(n-bit random number) that al...
It seems that ElGamal encryption is also possible for Elliptic Curve cryptography. However, that requires the user to convert the message to a point on the curve. What strategies are there to derive a point from a plaintext message? Is it simply generating an X value that just the message converting to a number and fin...
As a bit of practice, I'm reinventing the wheel by implementing DES in python. Before I even got beyond the first function, I came across a problem... With key legorooj, which happens to be "64" bits, that should work as a DES key. However, when I use python's built in binary transformation function, I get 56 bits. Wha...
I wonder what is the security of RSAES-PKCS1-v1_5 under chosen-plaintext attack, in the context of signature verification. Notations. Let $(N,d)$ be an RSA signing key, and $(N,e)$ the corresponding verification key, with no assumption on $e$ (in particular, I don't assume $e=3$ and consider the general case $e=2^{16}+...
When using GCM, The padding string $0^{31}||1$ is appended to the IV. I know that this is done to avoid the repetition of $E_K(0^n)$ which is used as key for the GHash. But what would be the security implications if the IV could be $0^n$, what concrete attacks would be possible then?
Suppose I have the following hash function: $\newcommand{\md}[1]{\text{md#1}} \newcommand{\H}{\text{H}}$ $$\H(x, y) = \md{5}(x) \oplus \md{4}(y)$$ How can I prove it's collision proof? I tried to say "lets assume we have an oracle which know how to find a collision/pre image of $\H$" and find an algorithm to find $\md...
Are there any known constructions of functional encryption with function-privacy for arbitrary functions (e.g. not just inner-product)? If so, are these constructions currently feasible or for now just theoretical?
If I have a message m and want its HMAC, I can simply do HMAC(k, m). But sometimes I am not given m but the hash of m: H(m). If I do HMAC(k, H(m)) instead of HMAC(k, m), does this make it more or less secure? HMAC hashes m when it is longer than block size. So I guess this question is only meaningful when m is equal or...
I'm currently looking into OpenSSL and its API and I'm not really familiar with cryptography. So I was looking at the example on asymmetric encryption of an envelope. And it says the message is symmetrically encrypted with a session key that is then encrypted with the actual asymmetric key. Then my question would be h...
This is a follow up to my earlier question. This is more out of curiosity in how AEAD (like CCM or GCM) works compared to encryption in other modes (like CBC or ECB). Suppose you have AES-256-CBC encrypted blocks of data, each encrypted with a proper nonce (no collisions). How is it less safe and non-authenticated comp...