~apreiml/bigc

A big int calculator written in hare
move bigint to https://git.sr.ht/~apreiml/hare-wipcrypto

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~apreiml/bigc
read/write
git@git.sr.ht:~apreiml/bigc

You can also use your local clone with git send-email.

bigc is a big int calculator written in hare to test and research a constant
time big integer library suitable for cryptographic primitives like RSA or
DH-E.

Sytnax (DRAFT):

Numbers: 1234
Hexnumbers: 0x1234
Strings: "asdf"
Operators +, -, *, ** (power)
Parnatheses to group expressions (1234 + 445)
variables and assignments: n1 = 893
comparision ==, !=, >, <, >=, <=

mod keyword to set modulo for expressions that follow

```
mod 7
4 + 5 == 2
```

modulo can also be updated:

```
n = 13	
mod 7
n == 6
mod 5
n == 1
```

Comments: `//`
Block comments: `/* ... */`

Functions:

```
addone = fn(x) {
	return x + 1
}
```

builtin functions:

print(val) // print value as number
printh(val) // print value as hex 
inv(i) // returns inverse of i

keywords: mod, return, fn