Clock with the top 12 relabeled as a 0

WTF is "signing" something with ETH anyways, and what does it have to do with geometry? Part 1: Finite Fields

By webguy24 | terrible-math | 13 Aug 2023


 

Okay, if you spent any time using ETH, you have probably heard of something called "signing" a transaction. What does this do?

To understand this, you first need to understand something called elliptic curve cryptography, which is basically what ETH uses as security. To understand that you need to know what an elliptic curve is, obviously. And to understand what a elliptic curve is, a basic requirement is what a finite field is.

WTF is a finite field?

A finite field is a field with a finite number of elements. No way.

Ok no shit, but what the hell is a field?

A field is an algebraic structure defined with two operations. (It's basically a set with addition and multiplication defined "nicely", such that everything has a additive and multiplicative inverse; for every A there exists a B such that A+B=0 and A*B=1).

Examples of fields you have probably heard of: 

R - the field of reals, basically your normal numbers, you know, 1, 0.5, the square root of 2, -5, etc.

- remember in high school when your teacher made up something called an imaginary number? Well you can also define it without the square root of -1, using something called a "field extension" on R. You probably remember that an imaginary number is of the form a+b*i, but note that this is basically like "choosing two real numbers and multiplying the last one by a weird number I made up". We denote this by R[i].

Complex Numbers - Department of Mathematics at UTSA

Examples of sets that are NOT fields:

Z - the set of integers under addition and multiplication. Why is this not a field? Well, what's the multiplicative inverse of 3, a number such that A*3=1? If you remember basic algebra, then A is a third, right?

Is 1/3 an integer? No? Hmmm.... then that means 3's inverse is not in the set ! So it doesn't have an inverse! Thus Z is not a field. (We call it a "ring".)

None of these are finite! These are all infinite sets! WTF is a finite one then?

 

Clocks Pictures | Download Free Images on Unsplash

 

(This is a clock. (Unsplash) )

 

A quick question: suppose the hour hand on a clock is pointing to the number "4". Then what number will it point to in three hours? Obviously the number "7", right? Because... 4+3=7!

But what if the hour hand is pointing to 10? In three hours it points to 1? So I'm saying 10+3=1? In fact, there's a very real and intuitive sense in which this is true, in which 10+3=1! Think about this for a bit and see if you can come up with any good explanation.

 

Looping around the remainders

 

If you took the time to think (which you didn't), then you'll probably get some sense that addition on a clock "loops around" every 12, such that 13=1, 14=2, etc etc. To make everything nicer in the future, let's relabel the top number of our clock as the number 0.

 

ed2Ad3n.png

Then there's a sense in which we're simply "taking the remainder after dividing by 12" each time we do addition or subtraction.

For example, 10+6 around a clock is 4, which is also equivalent to the remainder after dividing 16 by 12. 10+2=12, which is obviously divisible by 12, so it equals zero in this weird "clock arithmetic".

 

Mathematicians (and programmers) sometimes refer to this as working in "mod 12", which is just a fancy way to say "replace every number by its remainder when you divide it by 12."

 

Next week: multiplication around a clock, and our first example of a true finite field! (Trust me, we will get to Ethereum soon, but we need to establish some fundamentals first.)

 

 

How do you rate this article?

7



terrible-math
terrible-math

Terrible math related content is posted here. Mostly for fun. Also I started this to get 100 gwei in order to transfer out some USDC i have locked away in ETH, and I have no money to pay for gas fees. So I'm basically begging for money on the internet. proof: 0xB032058526305C70AE533D4020e9062F9Cde5DA5 is the account with USDC in it

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.