kyber_ops

package
v0.0.0-...-8f769a3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Copyright (c) 2023 Tracy-Tzu under the MIT license The kyber algorithm has a license that can be found in the file titled "nist-pqc-license-summary-and-excerpts.pdf"

Go port of the kyber post quantum encryption algorithm laid out by the NIST round 3 package that can be found by following the link below: https://csrc.nist.gov/Projects/post-quantum-cryptography/selected-algorithms-2022

This file contains common code used for kyber_512,kyber_768,and kyber_1024

Copyright (c) 2023 Tracy-Tzu under the MIT license The kyber algorithm has a license that can be found in the file titled "nist-pqc-license-summary-and-excerpts.pdf"

Go port of the kyber post quantum encryption algorithm laid out by the NIST round 3 package that can be found by following the link below: https://csrc.nist.gov/Projects/post-quantum-cryptography/selected-algorithms-2022

This file contains code to encode and decode polynomials and vectors used for kyber_512,kyber_768,and kyber_1024

Copyright (c) 2023 Tracy-Tzu under the MIT license The kyber algorithm has a license that can be found in the file titled "nist-pqc-license-summary-and-excerpts.pdf"

Go port of the kyber post quantum encryption algorithm laid out by the NIST round 3 package that can be found by following the link below: https://csrc.nist.gov/Projects/post-quantum-cryptography/selected-algorithms-2022

This file contains code used for the test files in the kyber implementations: kyber_512,kyber_768,kyber_1024

Index

Constants

View Source
const K_512, K_768, K_1024 = 2, 3, 4

Variables

This section is empty.

Functions

func AES_encrypt_128

func AES_encrypt_128(stream cipher.Block, bytes128 *[128]byte, iv *[16]byte)

func Add_poly

func Add_poly(f, g, fg *[256]int16)

func Add_vec

func Add_vec[v vec](f, g, fg v)

func CBD2

func CBD2(B *[128]byte, f *[256]int16)

func CBD2_cycle_aes

func CBD2_cycle_aes[v vec](f v, bytes128 *[128]byte, iv *[16]byte, aes cipher.Block)

func CBD2_cycle_shake

func CBD2_cycle_shake[v vec](f v, bytes128 *[128]byte, r *[33]byte, shake sha3.ShakeHash)

func CBD3

func CBD3(B *[192]byte, f *[256]int16)

func CBD3_cycle_aes

func CBD3_cycle_aes[v vec](f v, bytes192 *[192]byte, iv *[16]byte, aes cipher.Block)

func CBD3_cycle_shake

func CBD3_cycle_shake[v vec](f v, bytes192 *[192]byte, r *[33]byte, shake sha3.ShakeHash)

func CSUBQ_poly

func CSUBQ_poly(f *[256]int16)

func CSUBQ_vec

func CSUBQ_vec[v vec](f v)

func Com_1

func Com_1(f *[256]int16, com []byte)

func Com_10

func Com_10[v two_vec](f v, com []byte)

func Com_11

func Com_11(f *[K_1024][256]int16, com []byte)

func Com_4

func Com_4(f *[256]int16, com []byte)

func Com_5

func Com_5(f *[256]int16, com []byte)

func Compare_Keys

func Compare_Keys(str string, sk, pk, ct, ss_enc, ss_dec []byte, len_pk, len_sk, len_ct uint) (curpos uint, err error)

func Decode_12

func Decode_12[v vec](B []byte, f v)

func Decom_1

func Decom_1(com []byte, f *[256]int16)

func Decom_10

func Decom_10[v two_vec](com []byte, f v)

func Decom_11

func Decom_11(com []byte, f *[K_1024][256]int16)

func Decom_4

func Decom_4(com []byte, f *[256]int16)

func Decom_5

func Decom_5(com []byte, f *[256]int16)

func Encode_12

func Encode_12[v vec](f v, B []byte)

func Init_Seed

func Init_Seed(str string) (err error)

func Inv

func Inv(f *[256]int16)

func Mod_poly

func Mod_poly(f *[256]int16)

func Mod_vec

func Mod_vec[v vec](f v)

func Mont_poly

func Mont_poly(f *[256]int16)

func Mul_matrix

func Mul_matrix[v vec](f, g v, fg, temp *[256]int16)

func NTT_vec

func NTT_vec[v vec](f v)

func Parse_aes

func Parse_aes(f *[256]int16, stream cipher.Block, iv *[16]byte)

func Parse_shake

func Parse_shake(f *[256]int16, stream sha3.ShakeHash)

func Read_RNG

func Read_RNG(rand_data []byte)

func Sub_poly

func Sub_poly(f, g, fg *[256]int16)

func Upper

func Upper(input string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL