Posts

Fast Base Conversion and Its Application

Image
Fast Base Conversion (FBC) is a technique used to convert a number from one modulus space to another. For example, if we have 14 m o d     77 14 \mod 77  and want to convert it to x m o d     390 x \mod 390 , FBC is widely used. Mathematically, it can be represented as follows: Here, the above equation represents an integer x x  in modulus q q , and FBC converts this integer into the modulus space t t . The modulus q q  is the product of small coprime moduli (i.e., q = q 1 q 2 … q k q = q_1 q_2 \dots q_k ​ ), and x x  is an integer such that x ∈ [ 0 , q ) x \in [0, q) . We also note that q q  and t t  are coprime numbers. Here, we remark that it is not necessary for the above equation to produce the exact result for x x . Instead of x m o d     t x \mod t , it will provide x ′ m o d     t x' \mod t . Thus, the output of the above equation is as follows: FBC ( x , q , t )  =  x  +  A q  mod  t , where A ∈ [ 0 , k − 1 ] A \in [0,...

Exciting Facts about Homomorphic Encryption

Image
Homomorphic encryption (HE) is a process that allows computations to be performed on encrypted data without requiring the secret key. 2. The most widely used schemes are A. BFV B. BGV C. CKKS D. TFHE SIMD means single instruction multiple data. 3. Hey, can BGV/BFV perform the evaluation of trigonometric functions?. Ans: No (It's difficult) 😭  4. Hey, can  CKKS can perform the evaluation of trigonometric functions? Ans: YES 😆 5. Homomorphic multiplication is costly, as it rapidly increases noise growth. 6. In homomorphic encryption ciphertext can be defined as          C = C0 + C1.s Thus, during multiplication C*C' = (C0+C1.s)*(C0'+C1'.s) C*C' = C0C0' + [C0C1' + C0'C1].s +C1C1'.s^2 oops!!! C*C' is quadratic 😭 Introduce the concept of re-linearization here (re-linearization means converting degree 2 ciphertext into degree 1 ciphertext). Thus, C*C' = C0C0' + C.S   In another way, re-linearization is a technique that makes your process com...

Brakerski-Fan-Vercauteren (BFV) Homomorphic Encryption

Image
Homomorphic encryption means computation over encrypted data without secret key.  How this is possible  ?? 😴 In this blog, we will explore the types of Homomorphic Encryption and demonstrate how computations can be performed on encrypted data without the secret key. In 2009, Gentry proposed Fully Homomorphic Encryption. In 2012, Brakerski proposed a leveled homomorphic encryption scheme that works over integer arithmetic, which later became known as the BFV scheme. BFV is an encryption scheme. Thus, as an encryption scheme, it is expected to be secure. To date, under certain conditions, it is assumed that the scheme is safe, and its security is based on the Learning With Errors (LWE) assumption.. Learning-with-error (LWE): Given a pair of a, b and the task is to recover secret key (s), such that b = a.s  + e  Here e is error mostly picked from gaussian distribution, and a, s are selected from Rq (known as ring module R) The above problem is HARD. The proof is not si...

Homomorphic Encryption: A Basic Idea

Image
Homomorphic encryption has the same aim as other encryption-decryption mechanisms: maintaining confidentiality, security, privacy, etc.  In this blog, we will see homomorphic encryption and its type.  Homomorphic Encryption (HE):  It is an encryption that computes operations over encrypted data without decrypting it (or without the need for a secret key).  Mathematically speaking in a client-server architecture: client has message 'm' and function f. The task of client is to compute f(m). Due to computational expensiveness (maybe one of the reason) client sends encryption of message (say Enc(m)) and 'f' to the server. Server will compute function over encrypted message, that is, f(Enc(m)), and return the result to the client, that is, Enc(f(m)). Client will decrypt it Dec(Enc(f(m)), that is, f(m). Hence, client achieves f(m).  Let's understand HE with our daily life (Tea making process): Figure 1. Here m is message, Enc is encryption, f is function, and Eval in...

Hybrid Cryptosystem

Image
 Hi folks ! Hope you are doing great. In this blog study, we will going to discuss about hybrid cryptosystem. Hybrid  Cryptosystem  : A process when we combine symmetric as well as asymmetric cryptosystem together, the obtained system is called as a hybrid cryptosystem.  - In hybrid cryptosystem, a random secret key for symmetric cipher is generated and then encrypt this key via an asymmetric cipher using the receiver public key. - The message itself is then encrypted using the symmetric cipher and the secret key.  - Both the encrypted secret key and the encrypted message are then sent to the receiver.  - The receiver decrypts the secret key first, using his/her own private key, and then uses that key to decrypt the message.  What is the need of Hybrid Cryptosystem  : As we know that single symmetric as well as only asymmetric key encryption cannot provides full security in some specific area like when the key size is large and we need authenticat...

Sigma (Σ) - Protocol

Hope you enjoyed the Journey of Zero Knowledge Proof. Before, enjoying this blog it is recommended for user to study zero knowledge Proof ( https://akshitaggarwaliiit.blogspot.com/2022/03/zero-knowledge-proof-of-knowledge.html ) and then study the sigma (Σ) Protocol.  Sigma Protocol is basically a way to obtain efficient Zero Knowledge.  Sigma Protocol Template :      . Common Input : P and V both have x.      . Private Input : P has w such that (x, w)  ∈  R.      . Three Round Protocol :           . P sends a message a.          . V sends a random t-bit string e.         . P sends a reply z.          . V accepts based solely on (x, a, e, z).      . Completeness : As usual in Zero Knowledge (ZK).     . Special Soundness : There exist an efficient extractor A tha...

Zero Knowledge Proof of Knowledge

 Hi All ! Hope you all are doing great. ! This Blog is regarding Zero Knowledge Proof. The advance research in the area of Blockchain and Cryptographic Algorithm makes this concept very dominant.  Zero Knowledge Proof   : Let R be a polynomial time decidable binary relation. The corresponding language L which is patches of statements x such that there holds or exist witness w and (x,w)  ∈  R. We specify L as an NP Language.  Consider two entities P and V which is called as Prover and verifier term as zero knowledge proof if it has two mandatory Properties i.e.  Completeness and Soundness.  A. Completeness :   It means  ∀ x  ∈  L, (P,V)(x) is always 1.  B. Soundness  : It means  ∀ x  ∉  L, every Prover P*, Pr[<P*,V>(x) = 1] is always negligible.  Example : Consider two friends Kuk (Prover) and Goa (Verifier). Goa has color blindness. Goa has two identical apples but of differ...

Byzantine Agreement

Image
 Hi Folks ! Hope you are doing well ! 😉 This Blog is regarding Byzantine attack or means Byzantine agreement.  What is Byzantine ?? 😬 A friend having capricious behavior is called byzantine. This can be your imagination also.  Example: Not sending correct message to the fellow friends, sending no message to the fellow friends or lying about the input. Note: Byzantine nature also includes collusion, i.e. , all byzantine friends are controlled by the same adversary. What is Byzantine Problem ?? Lets us consider through example. Suppose in a class of Algorithm there are 20 friends and they are planning for mass bunk but in 20 friends there are some fellow friends who are not planning for mass bunk. In this situation it is quite difficult to take decision. This Problem is called as a Byzantine Problem.  This Problem is solvable if an only if atleast two third fellows friends are loyal.  Can you solve Byzantine Problem with 3 friends ?? Answer is ob...

Elliptic Curve (When , Why , Where ??)

Image
Hi Folks ! This blog is regarding Elliptic curves. Hope after reading this blog you will be able to know about the basics of elliptic curves.  Una and Jammu are the two best friends. One day Una saw the equation  of elliptic curve. Now, Una became curious regarding elliptic curve means what is elliptic curve and how they are generated and why they are generated ?. 😓 So he call to his friend Jammu. Una : Hey Jammu ! How are you ?? Jammu : I'm good Una. Thanks for asking.  Una : Hey Jammu ! you know about my nature 😁 so I don't want to waste your time. Yesterday, I saw the equation of elliptic curve. so can you please tell me about elliptic curve means how they generated and why they generated ?  Jammu : Hahahah !!! Ok, Sure Una. Have you know about Tunnell's  theorem ?? Una : No. 😌. Jammu : Don't Panic Una. See my below text.  Finding a simple test to determine whether or not a given integer say ‘n’ is the area of some right triangle all of ...

Basic Understanding Regarding Digital Signatures and Attacks

Image
Sometimes we get lot of messages or files from our friends or may be relatives. Have we ever thought whether our friends or relative has sent this or not ??🥴 Usually no, but Don't brood Digital signature helps us to verify that it is your friend or not.  Digital Signature is mathematical model or scheme that is significant for verifying the authenticity of your message.  Lets us understand digital signature with the help of Generic Model (as shown in Fig. 1). Fig.1 : Generic Model of Digital Signature Process Properties Message Authentication protects who exchange two parties who exchange message from any third party. However, it does not protect the two parties against each other.  Suppose Jammu sends an authenticated message to Una. Please consider the following disputes that could arises. A. Una may forge a different message and claim that it came from mandi. Una would simply have to create a message and append an authenticated code using the key that Jammu and Una sh...