Documentation
¶
Index ¶
- Constants
- Variables
- func Another(r []*FP48, P1 *ECP8, Q1 *ECP)
- func Another_pc(r []*FP48, T []*FP16, QV *ECP)
- func AuthDecap(config_id int, skR []byte, pkE []byte, pkR []byte, pkS []byte) []byte
- func AuthEncap(config_id int, skE []byte, skS []byte, pkE []byte, pkR []byte, pkS []byte) []byte
- func Comp(a *BIG, b *BIG) int
- func Core_Sign(SIG []byte, M []byte, S []byte) int
- func Core_Verify(SIG []byte, M []byte, W []byte) int
- func Decap(config_id int, skR []byte, pkE []byte, pkR []byte) []byte
- func DeriveKeyPair(config_id int, SK []byte, PK []byte, SEED []byte) bool
- func ECDH_ECIES_DECRYPT(sha int, P1 []byte, P2 []byte, V []byte, C []byte, T []byte, U []byte) []byte
- func ECDH_ECIES_ENCRYPT(sha int, P1 []byte, P2 []byte, RNG *core.RAND, W []byte, M []byte, V []byte, ...) []byte
- func ECDH_ECPSP_DSA(sha int, RNG *core.RAND, S []byte, F []byte, C []byte, D []byte) int
- func ECDH_ECPSVDP_DH(S []byte, WD []byte, Z []byte, typ int) int
- func ECDH_ECPVP_DSA(sha int, W []byte, F []byte, C []byte, D []byte) int
- func ECDH_IN_RANGE(S []byte) bool
- func ECDH_KEY_PAIR_GENERATE(RNG *core.RAND, S []byte, W []byte) int
- func ECDH_PUBLIC_KEY_VALIDATE(W []byte) int
- func Encap(config_id int, skE []byte, pkE []byte, pkR []byte) []byte
- func FP_tpo(i *FP, s *FP) int
- func G1member(P *ECP) bool
- func G2member(P *ECP8) bool
- func GTcyclotomic(m *FP48) bool
- func GTmember(m *FP48) bool
- func Init() int
- func KEY_PAIR_GENERATE(RNG *core.RAND, D []byte, Q []byte) int
- func KeyPairGenerate(IKM []byte, S []byte, W []byte) int
- func KeySchedule(config_id int, mode int, Z []byte, info []byte, psk []byte, pskID []byte) ([]byte, []byte, []byte)
- func MPIN_CLIENT_1(CID []byte, rng *core.RAND, X []byte, pin int, TOKEN []byte, SEC []byte, ...) int
- func MPIN_CLIENT_2(X []byte, Y []byte, SEC []byte) int
- func MPIN_ENCODE_TO_CURVE(DST []byte, ID []byte, HCID []byte)
- func MPIN_EXTRACT_PIN(CID []byte, pin int, TOKEN []byte) int
- func MPIN_GET_CLIENT_SECRET(S []byte, IDHTC []byte, CST []byte) int
- func MPIN_GET_SERVER_SECRET(S []byte, SST []byte) int
- func MPIN_HASH_ID(sha int, ID []byte) []byte
- func MPIN_RANDOM_GENERATE(rng *core.RAND, S []byte) int
- func MPIN_SERVER(HID []byte, Y []byte, SST []byte, xID []byte, mSEC []byte) int
- func RFC7748(r *BIG)
- func SIGNATURE(ph bool, D []byte, ctx []byte, M []byte, SIG []byte) int
- func VERIFY(ph bool, Q []byte, ctx []byte, M []byte, SIG []byte) bool
- type BIG
- func BIG_frombytearray(b []byte, n int) *BIG
- func FromBytes(b []byte) *BIG
- func Modadd(a1, b1, m *BIG) *BIG
- func Modmul(a1, b1, m *BIG) *BIG
- func Modneg(a1, m *BIG) *BIG
- func Modsqr(a1, m *BIG) *BIG
- func NewBIG() *BIG
- func NewBIGcopy(x *BIG) *BIG
- func NewBIGdcopy(x *DBIG) *BIG
- func NewBIGint(x int) *BIG
- func NewBIGints(x [NLEN]Chunk) *BIG
- func Random(rng *core.RAND) *BIG
- func Randomnum(q *BIG, rng *core.RAND) *BIG
- func Randtrunc(q *BIG, trunc int, rng *core.RAND) *BIG
- type Chunk
- type DBIG
- type ECP
- func ECP_fromBytes(b []byte) *ECP
- func ECP_generator() *ECP
- func ECP_hap2point(h *BIG) *ECP
- func ECP_map2point(h *FP) *ECP
- func ECP_mapit(h []byte) *ECP
- func ECP_muln(n int, X []*ECP, e []*BIG) *ECP
- func G1mul(P *ECP, e *BIG) *ECP
- func NewECP() *ECP
- func NewECPbig(ix *BIG) *ECP
- func NewECPbigint(ix *BIG, s int) *ECP
- func NewECPbigs(ix *BIG, iy *BIG) *ECP
- func (E *ECP) Add(Q *ECP)
- func (E *ECP) Affine()
- func (E *ECP) Cfp()
- func (E *ECP) Copy(P *ECP)
- func (E *ECP) Equals(Q *ECP) bool
- func (E *ECP) GetS() int
- func (E *ECP) GetX() *BIG
- func (E *ECP) GetY() *BIG
- func (E *ECP) Is_infinity() bool
- func (E *ECP) Mul(e *BIG) *ECP
- func (E *ECP) Mul2(e *BIG, Q *ECP, f *BIG) *ECP
- func (E *ECP) Neg()
- func (E *ECP) Sub(Q *ECP)
- func (E *ECP) ToBytes(b []byte, compress bool)
- func (E *ECP) ToString() string
- type ECP8
- func (E *ECP8) Add(Q *ECP8) int
- func (E *ECP8) Affine()
- func (E *ECP8) Cfp()
- func (E *ECP8) Copy(P *ECP8)
- func (E *ECP8) Equals(Q *ECP8) bool
- func (E *ECP8) GetX() *FP8
- func (E *ECP8) GetY() *FP8
- func (E *ECP8) Is_infinity() bool
- func (E *ECP8) Mul(e *BIG) *ECP8
- func (E *ECP8) Sub(Q *ECP8) int
- func (E *ECP8) ToBytes(b []byte, compress bool)
- func (E *ECP8) ToString() string
- type FP
- type FP16
- type FP2
- func ECP8_frob_constants() [3]*FP2
- func FP2_fromBytes(bf []byte) *FP2
- func NewFP2() *FP2
- func NewFP2big(c *BIG) *FP2
- func NewFP2bigs(c *BIG, d *BIG) *FP2
- func NewFP2copy(x *FP2) *FP2
- func NewFP2fp(c *FP) *FP2
- func NewFP2fps(c *FP, d *FP) *FP2
- func NewFP2int(a int) *FP2
- func NewFP2ints(a int, b int) *FP2
- func NewFP2rand(rng *core.RAND) *FP2
- type FP4
- type FP48
- func Ate(P1 *ECP8, Q1 *ECP) *FP48
- func Ate2(P1 *ECP8, Q1 *ECP, R1 *ECP8, S1 *ECP) *FP48
- func FP48_fromBytes(w []byte) *FP48
- func Fexp(m *FP48) *FP48
- func GTpow(d *FP48, e *BIG) *FP48
- func Initmp() []*FP48
- func Miller(r []*FP48) *FP48
- func NewFP48() *FP48
- func NewFP48copy(x *FP48) *FP48
- func NewFP48fp16(d *FP16) *FP48
- func NewFP48fp16s(d *FP16, e *FP16, f *FP16) *FP48
- func NewFP48int(d int) *FP48
- type FP8
Constants ¶
const AESKEY int = 32
const ALLOW_ALT_COMPRESS bool = false
const ATE_BITS int = 42
const BAD_PARAMS int = -11
const BAD_PIN int = -19
const BASEBITS uint = 58
const BFS int = int(MODBYTES)
const BGS int = int(MODBYTES)
const BIGBITS int = int(MODBYTES * 8)
const BIG_ENDIAN_SIGN bool = false
const BLS12 int = 2
const BLS24 int = 3
const BLS48 int = 4
const BLS_FAIL int = -1
const BLS_OK int = 0
const BN int = 1
const CHUNK int = 64 /* Set word size */
const CURVETYPE int = WEIERSTRASS
const CURVE_A int = 0
const CURVE_B_I int = 17
const CURVE_Cof_I int = 0
const CURVE_PAIRING_TYPE int = BLS48
const DNLEN int = 2 * NLEN
const D_TYPE int = 0
Pairing Twist type
const ECDH_ERROR int = -3
const ECDH_INVALID_PUBLIC_KEY int = -2
const EDDSA_INVALID_PUBLIC_KEY int = -2
const EDWARDS int = 1
const EFS int = int(MODBYTES)
const INVALID int = -4
const EGS int = int(MODBYTES)
const FEXCESS int32 = ((int32(1) << 24) - 1)
const FP_DENSE int = 5
const FP_ONE int = 1
const FP_SPARSE int = 4
const FP_SPARSER int = 3
const FP_SPARSEST int = 2
const FP_ZERO int = 0
Sparsity
const G2_TABLE int = 35
const GENERALISED_MERSENNE int = 3
const HASH_TYPE int = 64
const HBITS uint = (BASEBITS / 2)
const HTC_ISO int = 0
const HTC_ISO_G2 int = 0
const INVALID_POINT int = -14
const MAXPIN int32 = 10000 /* PIN less than this */
const MFS int = int(MODBYTES)
const MGS int = int(MODBYTES)
const MODBITS uint = 556 /* Number of bits in Modulus */
Modulus details
const MODBYTES uint = 70
BIG length in bytes and number base
const MODTYPE int = NOT_SPECIAL //NOT_SPECIAL
const MONTGOMERY int = 2
const MONTGOMERY_FRIENDLY int = 2
const M_TYPE int = 1
const NEGATIVEX int = 1
const NEGATOWER int = 0
const NEXCESS int = (1 << (uint(CHUNK) - BASEBITS - 1))
const NLEN int = int((1 + ((8*MODBYTES - 1) / BASEBITS)))
BIG lengths and Masks
const NOT int = 0
Pairing Friendly?
const NOT_SPECIAL int = 0
Modulus types
const PBLEN int32 = 14 /* Number of bits in PIN */
const PM1D2 uint = 1 /* Modulus mod 8 */
const POSITIVEX int = 0
Pairing x parameter sign
const POSITOWER int = 1
const PSEUDO_MERSENNE int = 1
const QNRI int = 0 // Fp2 QNR
const RIADZ int = -1 /* hash-to-point Z */
const RIADZG2A int = 2 /* G2 hash-to-point Z */
const RIADZG2B int = 0 /* G2 hash-to-point Z */
const SEXTIC_TWIST int = M_TYPE
const SIGN_OF_X int = POSITIVEX
const TBITS uint = MODBITS % BASEBITS // Number of active bits in top word
const TOWER int = NEGATOWER // Tower type
const USE_GLV bool = true
const USE_GS_G2 bool = true
const USE_GS_GT bool = true
const WEIERSTRASS int = 0
Curve types
const WRONG_ORDER int = -18
Variables ¶
var CRu = [...]Chunk{0x364E7E6CBBA429, 0x338C28A4D3DD160, 0x28DC3C68308093A, 0x230B290AE0E768, 0x127B0AB9B73BC2D, 0x23192337B1A639C, 0x1E399AEEFF04AE3, 0x20C88F0091318E5, 0x37CEF23203A79F7, 0x3F45F60F3}
var CURVE_Cof = [...]Chunk{0xA2D10F7F12ABEB, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
var CURVE_B = [...]Chunk{0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
var CURVE_Bnx = [...]Chunk{0x7DE40020, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
var CURVE_Cof = [...]Chunk{0x7DE4001F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
var CURVE_Gx = [...]Chunk{0x3286D2F65D71D33, 0x3601553F8CB783F, 0xFF01647711EE0B, 0x268BC07F29FD8CC, 0xE0702E69A80F66, 0x285003EAC056511, 0x35E130D242B2C3A, 0x107024C87924166, 0x17595DB8957EDD7, 0x26A27A4A1}
var CURVE_Gy = [...]Chunk{0x29A5B3FEA6ED83A, 0x3712E552A29C33D, 0x3391EA8E6958677, 0x29F3C7B9DED7E3E, 0x4E2E3818FB7229, 0x1CC30999551E32D, 0xE67A4086260E3C, 0x2A68CCB8579C437, 0x62C5FAE2B3349D, 0x2B634253}
var CURVE_HTPC = [...]Chunk{0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
var CURVE_Order = [...]Chunk{0x2FFFF0000000001, 0x11550278A769C21, 0x14D1EB162029C21, 0x2309B4A2B6307F4, 0x34790BD26DFED78, 0x2C6FE3F2571037B, 0x1306A973C465FB0, 0x28446ABB18DF17A, 0xC43BF73E, 0x0}
var CURVE_Pxaaa = [...]Chunk{0x28D2E8E8923CE4A, 0x2F5C40B4AE04F4A, 0x2165D8A1313A20C, 0x2BFC7FD18DF074F, 0x12B37F0A7C90B98, 0x286ED92CE57BD37, 0x1C416C4ABF57375, 0x39779D0B2EE2172, 0x1A1C0497A5D9487, 0x3995E3602}
var CURVE_Pxaab = [...]Chunk{0x271CDC5AC0A1BE1, 0x2A3F8EC01DF5FDC, 0xAD5478433972C5, 0x22B73FAE2491D8C, 0x30E75C6B40A11FA, 0xE960C8FF259C26, 0x8CE48632D18B04, 0x39549A6BC27F419, 0x274A97B58DB48B6, 0xA5080497}
var CURVE_Pxaba = [...]Chunk{0x23A724C770C5DC4, 0x2A592B776B3BCB6, 0x110934259BEC736, 0x18E2C5A649AB2A8, 0x2B84CB2C58CD55, 0x168195F91EE8B90, 0xF7D917CE233167, 0x2A38FB7729335BD, 0x36D71DDA78B689B, 0x2D4BFBE3D}
var CURVE_Pxabb = [...]Chunk{0xD629669A64B740, 0x47F52632481578, 0x40D7054323ADD1, 0x3F9F4CCCD789E1B, 0x1E3C73C41F4EEA7, 0x15E7D7A61968610, 0x1B4186B40590D3B, 0x19F3BA577306AAF, 0x12DFE5F23F63B1A, 0x24E102A76}
var CURVE_Pxbaa = [...]Chunk{0x1BB0C6172F1E01F, 0x30C4734D2C29802, 0x990FA39218788, 0xEEB80ED6AE2501, 0x34728852870C80B, 0x94841D1637D478, 0x21CBCE27C3AD4D4, 0xA29F9E111E6AD5, 0x18CF1447CC49D3, 0x37787BDFD}
var CURVE_Pxbab = [...]Chunk{0x30A38238637383D, 0x288094FE661F866, 0x135C51ED5D3D212, 0x3C39C57E8051F25, 0x164639D737D882F, 0x312AEC8AA8DB8FC, 0x3FE838885E54DA8, 0x2FC3978BA297414, 0x850556F014F91F, 0x20B6CE9E3}
var CURVE_Pxbba = [...]Chunk{0x1683DB3D711939C, 0x26F9475A69066BA, 0xBCDB572CF2F6C0, 0x128DC8902CE1323, 0x29B3233EF353D1C, 0x342402A46B7046, 0x3187D1A403D6070, 0x3E3466F9F23BA45, 0xD943BE2435A9CC, 0x2A08A9CE1}
var CURVE_Pxbbb = [...]Chunk{0x32D410A856F4899, 0x7147AE4A959750, 0x28AEA57990BC9BC, 0x2807F11E9E26DA, 0x282C5EBA71895E3, 0x2832162D9FEC5FF, 0x33479E30007597C, 0x227A376C26A4B00, 0x1C16F1567857A32, 0x37DD51E0F}
var CURVE_Pyaaa = [...]Chunk{0x2E097CFB4137844, 0x313B1927FD3CCDD, 0x1EB86FABC768851, 0x4156382E29C659, 0x3C10CC7CF8896E0, 0x22FC388FD1D539C, 0x2C3E202F56CDD39, 0x2E9645FB43E8C72, 0x93548FD8706190, 0x1D9BB42E1}
var CURVE_Pyaab = [...]Chunk{0x25E3248EDC83190, 0x2BAABD11AA26424, 0x161D23BAC418D32, 0x5B3258247CBFF7, 0xED295CADE03C1F, 0x3A84758C5C741A2, 0x3D207E205E02B9E, 0x86743E24EA6513, 0x1DAA8E268EFA1C4, 0x9E72CE4F}
var CURVE_Pyaba = [...]Chunk{0x1DC5FD041985C0D, 0x2350136864770FA, 0x3179A5F5483ACE9, 0x2C25AB1A171F32C, 0x397C4403E658341, 0xE7E1C2186E971, 0x15921F60B0A5F40, 0x46E9317635E008, 0x17EF1353F3140D6, 0x35166F259}
var CURVE_Pyabb = [...]Chunk{0x36FE0A8159D42F8, 0x290EBF4445895D7, 0x20273B0FE9E7F2B, 0x23A6E2FF0F3FD7D, 0x1F37678869E5006, 0x2CA2DB53C9ED8D, 0x4E4BFD902F51DE, 0x1FF8649F125B66, 0x382D89BED80731, 0x28383AAA8}
var CURVE_Pybaa = [...]Chunk{0xD512B39F38039F, 0x23BA255F3C68984, 0x390AA14058093CF, 0x1FF0B2F2FFA1622, 0x310C5CC5F2ABB75, 0x3D9016C9EB6A2C9, 0x1CF7EE268EC2F18, 0x338BBB12C36B65A, 0x1EEE591B8A1D1AB, 0xAC11927C}
var CURVE_Pybab = [...]Chunk{0x269E06F295F7865, 0x2FC1D5BA1CE9A0E, 0x3631F3F1DACADD7, 0x30CCF3581D3943, 0x3FBE3B902505BB0, 0x23C4A9D31B36A49, 0x2056135CA438576, 0x2B78046739984F4, 0x12C0AC57B6F180E, 0xC48CA65B}
var CURVE_Pybba = [...]Chunk{0x1D83A9F67CC1979, 0x12ABE71DD89E6F0, 0x247B1C21635FDA9, 0x92880950076209, 0x2ECF179E0D733D7, 0x20D2DFFB53841F9, 0x3441B1645BC9FE8, 0x3089222CE22EC9D, 0x3699AE4108C86C5, 0x320034967}
var CURVE_Pybbb = [...]Chunk{0xFC89562FC9F25B, 0xB13E01AE9AB5D3, 0x18E8F169C9D264F, 0x3A5828D76B24A13, 0x1E8FD9BCEF84D9A, 0x36D20E3DBFEE16A, 0x17D3B3DF1AB4C1C, 0xF190510390F005, 0x12640E61B9BF549, 0x283D84D97}
var Fra = [...]Chunk{0x2623CFD9325BF89, 0x341FA8DCCD0A56F, 0x1952FBA0E83BCCA, 0xBE3C26F8D1D297, 0x27F84ABE7AB9F2C, 0x13BDE945C9DECEB, 0x3B3213C83C0F60B, 0x3B7F0411FF27FF7, 0x80089C089BB36C, 0xA62E01EE}
var Frb = [...]Chunk{0x2623CFD9325BF89, 0x341FA8DCCD0A56F, 0x1952FBA0E83BCCA, 0xBE3C26F8D1D297, 0x27F84ABE7AB9F2C, 0x13BDE945C9DECEB, 0x3B3213C83C0F60B, 0x3B7F0411FF27FF7, 0x80089C089BB36C, 0xA62E01EE}
var G2_TAB []*FP16
var Modulus = [...]Chunk{0x2F6E60FFCF6AC0B, 0x259C02699877E7B, 0x37A9870D4228402, 0x80821A1DACBB04, 0x13016A7C025A415, 0x2BB355ACDE6E250, 0x20536F405DA950, 0x295B219C54AB351, 0x3FCFC5B23729047, 0x3F45F610B}
Base Bits= 58
var R2modp = [...]Chunk{0x25E03FA0D59D0FA, 0x6B55DC2DE8FD41, 0xA0E01D0B937F48, 0x20336279F50EFCE, 0x2212822A3470A2F, 0xD5A21C4F9FB72D, 0x89E8F0A1CFD9F8, 0x2291DA62B48793, 0x3DC6978EF609E61, 0x1735D29E}
var ROI = [...]Chunk{0x2F6E60FFCF6AC0A, 0x259C02699877E7B, 0x37A9870D4228402, 0x80821A1DACBB04, 0x13016A7C025A415, 0x2BB355ACDE6E250, 0x20536F405DA950, 0x295B219C54AB351, 0x3FCFC5B23729047, 0x3F45F610B}
var SQRTm3 = [...]Chunk{0x175B6ECDC809C48, 0x17C4EE00F42444, 0x1A0EF1C31ED8E73, 0x3C59437F81513CC, 0x11F4AAF76C1D444, 0x1A7EF0C284DE4E8, 0x3A6DFEE9F82EC76, 0x1835FC64CDB7E79, 0x2FCE1EB1D0263A7, 0x3F45F60DB}
var TWK = [...]Chunk{0x12267AA216F9937, 0x2F4D058D89F92B, 0x3061EA136600368, 0x2B3B2E5B531266E, 0x8DC0D0FC269C72, 0x3DDE9A740CAA903, 0x208D6556ED502F8, 0x1FB2700BEC6EF4F, 0x1A15FE7FEEEDD57, 0x10C83E724}
Functions ¶
func Another_pc ¶
func ECDH_ECIES_DECRYPT ¶
func ECDH_ECIES_DECRYPT(sha int, P1 []byte, P2 []byte, V []byte, C []byte, T []byte, U []byte) []byte
IEEE1363 ECIES decryption. Decryption of ciphertext V,C,T using private key U outputs plaintext M
func ECDH_ECIES_ENCRYPT ¶
func ECDH_ECIES_ENCRYPT(sha int, P1 []byte, P2 []byte, RNG *core.RAND, W []byte, M []byte, V []byte, T []byte) []byte
IEEE1363 ECIES encryption. Encryption of plaintext M uses public key W and produces ciphertext V,C,T
func ECDH_ECPSP_DSA ¶
IEEE ECDSA Signature, C and D are signature on F using private key S
func ECDH_ECPSVDP_DH ¶
IEEE-1363 Diffie-Hellman online calculation Z=S.WD
type = 0 is just x coordinate output type = 1 for standard compressed output type = 2 for standard uncompress output 04|x|y
func ECDH_ECPVP_DSA ¶
IEEE1363 ECDSA Signature Verification. Signature C and D on F is verified using public key W
func ECDH_IN_RANGE ¶
return true if S is in ranger 0 < S < order , else return false
func ECDH_KEY_PAIR_GENERATE ¶
Calculate a public/private EC GF(p) key pair W,S where W=S.G mod EC(p), * where S is the secret key and W is the public key * and G is fixed generator. * If RNG is NULL then the private key is provided externally in S * otherwise it is generated randomly internally
func FP_tpo ¶
Two for the price of one - See Hamburg https://eprint.iacr.org/2012/309.pdf Calculate inverse of i and square root of s, return QR
func GTcyclotomic ¶
Check that m is in cyclotomic sub-group Check that m!=1, conj(m)*m==1, and m.m^{p^16}=m^{p^8}
func KEY_PAIR_GENERATE ¶
Calculate a public/private EC GF(p) key pair. Q=D.G mod EC(p), * where D is the secret key and Q is the public key * and G is fixed generator. * RNG is a cryptographically strong RNG * If RNG==NULL, D is provided externally
func KeyPairGenerate ¶
generate key pair, private key S, public key W
func KeySchedule ¶
func MPIN_CLIENT_1 ¶
func MPIN_CLIENT_1(CID []byte, rng *core.RAND, X []byte, pin int, TOKEN []byte, SEC []byte, xID []byte) int
Implement step 1 on client side of MPin protocol
func MPIN_CLIENT_2 ¶
Implement step 2 on client side of MPin protocol
func MPIN_ENCODE_TO_CURVE ¶
func MPIN_GET_SERVER_SECRET ¶
Extract Server Secret SST=S*Q where Q is fixed generator in G2 and S is master secret
func MPIN_HASH_ID ¶
func MPIN_RANDOM_GENERATE ¶
create random secret S
func MPIN_SERVER ¶
Implement step 2 of MPin protocol on server side
Types ¶
type BIG ¶
type BIG struct {
// contains filtered or unexported fields
}
func BIG_frombytearray ¶
convert from byte array to BIG
func NewBIGcopy ¶
func NewBIGdcopy ¶
func NewBIGints ¶
type DBIG ¶
type DBIG struct {
// contains filtered or unexported fields
}
func NewDBIGcopy ¶
func NewDBIGscopy ¶
type ECP ¶
type ECP struct {
// contains filtered or unexported fields
}
func ECP_generator ¶
func ECP_generator() *ECP
type ECP8 ¶
type ECP8 struct {
// contains filtered or unexported fields
}
func ECP8_generator ¶
func ECP8_generator() *ECP8
func ECP8_hap2point ¶
func ECP8_map2point ¶
Deterministic mapping of Fp to point on curve
func NewECP8fp8 ¶
construct this from x - but set to O if not on curve
func NewECP8fp8s ¶
construct this from (x,y) - but set to O if not on curve
type FP ¶
type FP struct { XES int32 // contains filtered or unexported fields }
func FP_fromBytes ¶
type FP16 ¶
type FP16 struct {
// contains filtered or unexported fields
}
func FP16_fromBytes ¶
func NewFP16copy ¶
func NewFP16fp8 ¶
func NewFP16fp8s ¶
type FP2 ¶
type FP2 struct {
// contains filtered or unexported fields
}
func ECP8_frob_constants ¶
func ECP8_frob_constants() [3]*FP2
func FP2_fromBytes ¶
func NewFP2bigs ¶
func NewFP2copy ¶
func NewFP2ints ¶
func NewFP2rand ¶
type FP4 ¶
type FP4 struct {
// contains filtered or unexported fields
}
func FP4_fromBytes ¶
func NewFP4copy ¶
func NewFP4fp2s ¶
func NewFP4rand ¶
type FP48 ¶
type FP48 struct {
// contains filtered or unexported fields
}
func NewFP48copy ¶
func NewFP48int ¶
type FP8 ¶
type FP8 struct {
// contains filtered or unexported fields
}