utils

package
v0.0.0-...-02f8a93 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: BSD-3-Clause, MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstantTimeCmp

func ConstantTimeCmp(a, b []byte, l int) int

ConstantTimeCmp returns 1 if a > b, 0 if a == b, -1 otherwise a or b must not be nil and treated as unsigned big endian, should both in length l

func DecomposeNAF

func DecomposeNAF(out []int, s []byte, n, w int)

DecomposeNAF decomposes n-bit big endian integer s into w-NAF in LE See Algorithm 1 of https://www.iacr.org/archive/ches2014/87310103/87310103.pdf by Naomi Benger, Joop van de Pol, Nigel P. Smart, and Yuval Yarom This function should run very quickly therefore very hard to measure its timing or cache use. out must contain all zero or be newly created

Types

This section is empty.

Jump to

Keyboard shortcuts

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