• # H1
• ## H2
• ### H3
• _italic_
• **bold**
• ~~strikethrough~~
• - Lists
• 1. Numbered lists
• [References][1]
[1]: Can be used
• ![image alt](img/logo.png)
• Inline code
• pythonprint "Code block"
• > Quotes
• --- Horizontal rule
? Editing: Post:21.body Cancel
Content changed

# Ivanq's Blog

## Posts about encryption, zite development and everything else you want

• leftside: Great! thanks for ur kind work!
• gitcenter: Sorry, something went wrong. Fixed now!
• leftside: All mathematical equations seem to look raw html tags..! ...
• nofish: WebGL under linux can be problematic, here is some tips...

STICKED ·
1 comment

# Integrated Encryption Scheme and MAC

on Apr 29, 2019 · 6 min read

Today, we'll talk about MAC, DLIES and ECIES.

## DLIES

The first topic is DLIES, or Discrete Logarithm Integrated Encryption Scheme.

Pretend Alice wants to send a message to Bob. Alice doesn't want others to read the message, so she's going to encrypt it. Let's help Alice!

# Elliptic Curve Diffie-Hellman

on Apr 29, 2019 · 7 min read

Hello! Today I'm going to tell you about ECDH, or Elliptic Curve Diffie-Hellman protocol.

First of all, let's remember what EC means and what DH means.

1. EC is an Elliptic Curve. You can read about Elliptic Curve arithmetic on this blog. If you don't want to read it, here's an overview: We have some objects (points) which we can add. The usual rules apply, i.e. $A + B = B + A, (A + B) + C = A + (B + C)$.

2. DH is Diffie-Hellman protocol, i.e. a key derivation protocol. You can read about it on this blog as well. An overview: If Alice and Bob have private keys $a$ and $b$ they don't share, they can make up some integers $G$ and $M$ ($G$ is any integer, $M$ is a big prime integer). Then, they generate public keys: $A = G^a \mod M, B = G^b \mod M$ which they give to each other. Then, they generate shared key that they use for symmetric encryption: $S = B^a \mod M = A^b \mod M$.

Now, we're going to merge these two unmergable things. How? Read here.

# Diffie-Hellman protocol

on Apr 28, 2019 · 4 min read

Hello again!

Today, let's talk about key derivation.

### The problem

Pretend Alice and Bob are talking to each other, and they want to encrypt their messages. Of course, encryption requires a key, so they have to find a key somewhere. They could just meet in Alice's house, but... Alice and Bob are a little bit far from each other, so they can't meet directly. They also can't use mail to send the key because it could be compromised, and so on.

Oopsie.

# Introduction into Elliptic Curve arithmetic

on Apr 28, 2019 · 5 min read ·

Today, let's talk about Elliptic Curve arithmetic.

## Elliptic curves

First of all, what is an elliptic curve? If we're working in $\R$ field, we can say that an elliptic curve is defined by two real numbers $a$ and $b$ that follows the equation:

$x^2 = y^3 + ax + b$

This form is called the Weierstrass equation.

# Title

21 hours ago · 2 min read ·
Body