Skip to content

Commit

Permalink
Update and simplify API, complete refactor, don't serde internally.
Browse files Browse the repository at this point in the history
  • Loading branch information
bytemare committed Jun 6, 2024
1 parent d096aa1 commit 1e87417
Show file tree
Hide file tree
Showing 27 changed files with 1,647 additions and 1,744 deletions.
109 changes: 61 additions & 48 deletions .github/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,78 +5,95 @@ linters:
- asciicheck
- bidichk
- bodyclose
- canonicalheader
- containedctx
- contextcheck
- copyloopvar
- cyclop
- decorder
#- depguard
- dogsled
- dupl
- dupword
- durationcheck
- err113
- errcheck
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
#- exhaustive
- exhaustruct
- exportloopref
- fatcontext
- forbidigo
- forcetypeassert
- funlen
- gci
- ginkgolinter
- gocheckcompilerdirectives
#- gochecknoglobals
#- gochecknoinits
- gochecknoinits
- gochecksumtype
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- goerr113
- gofmt
- gofumpt
- goheader
- goimports
#- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- gosmopolitan
- govet
- grouper
- importas
- inamedparam
- ineffassign
- interfacebloat
- intrange
- ireturn
- lll
- logrlint
- loggercheck
- maintidx
- makezero
- mirror
- misspell
#- mnd
- musttag
- nakedret
- nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nolintlint
#- nonamedreturns
- nonamedreturns
- nosprintfhostport
- paralleltest
- perfsprint
- prealloc
- predeclared
- promlinter
- protogetter
- reassign
- revive
- rowserrcheck
- sloglint
- spancheck
- sqlclosecheck
- staticcheck
- stylecheck
- tagalign
- tagliatelle
- tenv
#- testableexamples
- testableexamples
- testifylint
- testpackage
- thelper
- tparallel
Expand All @@ -88,19 +105,11 @@ linters:
#- varnamelen
- wastedassign
- whitespace
- wrapcheck
#- wrapcheck
- wsl
presets:
- bugs
- unused
fast: false
- zerologlint

linters-settings:
cyclop:
# The maximal code complexity to report.
# Default: 10
max-complexity: 12
skip-tests: true
dupl:
threshold: 100
errcheck:
Expand Down Expand Up @@ -135,6 +144,8 @@ linters-settings:
- opinionated
- performance
- style
disabled-checks:
- unnamedResult
gocyclo:
min-complexity: 15
godox:
Expand All @@ -148,23 +159,12 @@ linters-settings:
simplify: true
goimports:
local-prefixes: github.com/bytemare/voprf
golint:
min-confidence: 0
gomnd:
checks:
- argument
- case
- condition
- operation
- return
- assign
ignored-functions:
- 'Import'
- 'Deserialize'
- 'DeriveKeyPair'
- 'i2osp2'
gosimple:
checks: [ "all" ]
govet:
check-shadowing: true
settings:
shadow:
strict: true
disable-all: true
enable:
- asmdecl
Expand Down Expand Up @@ -209,13 +209,23 @@ linters-settings:
tab-width: 4
misspell:
locale: US
mnd:
checks:
- argument
- case
- condition
- operation
- return
- assign
#ignored-functions:
# - 'nist.setMapping'
# - 'big.NewInt'
# - 'hash2curve.HashToFieldXMD'
nlreturn:
block-size: 2
prealloc:
simple: false
for-loops: true
unused:
check-exported: false
whitespace:
multi-if: false
multi-func: false
Expand All @@ -236,17 +246,18 @@ issues:
# But independently from this option we use default exclude patterns,
# it can be disabled by `exclude-use-default: false`. To list all
# excluded by default patterns execute `golangci-lint run --help`
exclude:
- "should have a package comment, unless it's in another file for this package"
#exclude:
#- "should have a package comment, unless it's in another file for this package"
#- "do not define dynamic errors, use wrapped static errors instead"
#- "missing cases in switch of type Group: maxID"

exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
#exclude-rules:
# - path: internal/hash.go
# linters:
# - errcheck
# - path: internal/tag/strings.go
# linters:
# - gosec

max-issues-per-linter: 0
max-same-issues: 0
Expand All @@ -260,5 +271,7 @@ issues:
run:
tests: false

output:
format: github-actions
#output:
# formats:
# - format: github-actions
# show-stats: true
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[![Go Reference](https://pkg.go.dev/badge/github.com/bytemare/voprf.svg)](https://pkg.go.dev/github.com/bytemare/voprf)
[![codecov](https://codecov.io/gh/bytemare/voprf/branch/main/graph/badge.svg?token=5bQfB0OctA)](https://codecov.io/gh/bytemare/voprf)

Package voprf provides abstracted access to Oblivious Pseudorandom Functions (OPRF) over Elliptic Curves as specified in
[RFC9497](https://datatracker.ietf.org/doc/rfc9497) and fully supports the OPRF, VOPRF, and POPRF protocols.
Package voprf implements [RFC9497](https://datatracker.ietf.org/doc/rfc9497) and provides Oblivious Pseudorandom Functions
(OPRF) over Elliptic Curves, and fully supports the OPRF, VOPRF, and POPRF protocols.

## Versioning

Expand Down
Loading

0 comments on commit 1e87417

Please sign in to comment.