# Blockchain Verification Math (Brilliant.Org)

First off, I want to give the Credit to Brilliant.Org. They have some really helpful interactive learning that dives deeper than most introductory classes I have seen in the space and helps build an understanding of cryptocurrency from its technical foundation.

This is the first of a 3-part series with the goal of demonstrating the basic thinking and math behind blockchain verification and show how they are able to use private / public key cryptography in order to verify ownership and maintain security.

**Goal:** Create an equation that can verify the signature proposed and confirm that it was generated using Anthony’s Private Key without requiring that the Private Key be known

**Approach: **Create an equation using the Signature provided by Anthony and the Public Key (both of which are generated using the Private Key) to prove the correct Private Key was used.

**Flaw**

You can divide the Signature by the Message or divide the Public Key by the Common # in order to back into Anthony’s Private Key

**Fix**

We can attempt to fix this using the Mod function which can hide the input by only providing the remainder after dividing by a specific number

For example 21 Mod 7 = 3 makes it impossible to know the original input was 21

**Does this fix the problem?**

Yes — now to break this and obtain the Private Key, you would need to solve for the Private Key by plugging in different values

You can’t identify the Private Key but you can still create a valid Signature using the public information available. Signature = (Message * Private Key) Mod N

The Message we know is equal to 101

We don’t know the Private Key but we do know the Public Key Mod N = Private Key Mod N. So when using the Public Key in place of the Private Key in the Signature, the output is the same

Put simply, when you run the Private Key or the Public Key through he Mod equation, you get the same answer, see below:

**Flaw Proof**

Signature (Where 115 is the Private Key) = (101 * 115) Mod N = 4

Signature (Where 13 is the Public Key) = (101 * 13) Mod N = 4

We can multiply the Public Key by an arbitrary number in order to make the outcome distinct from the outcome of the Private Key

**Does this fix the problem?**

Yes, by multiplying the Private key by the common # prior to running it through Modulo equation the Public Key can no longer be used to generate a Signature