Skip to content

Commit

Permalink
Squashed 'contrib/relic/' changes from 1885ae3b..e6209fd8
Browse files Browse the repository at this point in the history
e6209fd8 Increase robustness of non-initialized bignums.
d834ca4b Better place for exception throwing.
6d28711c Zero digits in recoding functions to simplify upper layer.
293beaf8 Add missing header.
ced4f230 Fixes.
8eec5159 Implementing blinding on twists for projective coordinates.
ff180c1e Avoid allocation rollbacks when errors occur.
a78ceb24 Fix comment, add missing error message.
09b8ff20 Add self-test for PRNG when callback is used.
82f87cef Removed unused include.
49e5486a Another fix for EPX == ep4 case.
4e2040a1 Fix GMP crash.
1b4d4ae8 Several minor fixes in FP and EPX. Implements ep4_mul_sim_lot().
cfa81d08 Pick correct curve when exponentiating G_T elements.
2a74905d Minor fix.
2e346579 Typos.
15cb6d1d Refactor to reduce code duplication.
30b67cbd Another fix.
ff2cf630 Fix typo.
73799126 Reduze size of regular recoding by one.
2f95c443 Better tests for the group order.
7991e63d Restore commented out tests.
9206ae50 Attempt to fix alignment issue.
17685344 Minor touches to protocols. ECIES nos supports legacy curves.
e2b7ffc2 More refined benchmarks.
bcda30a3 Refinement.
92c72508 Add ETRS to bench program.
696ddd77 Fix memory errors.
f58ce726 Refine benchmarking of ETRS further.
f5486775 Another try.
00c66b68 Reduce benchmarks size.
bf601552 Add ETRS scheme.
af858769 Add ETRS scheme.
5234fc6e Better benchmarking for ERS.
1ee21e7c Add better config for ed25519 curve.
1b7d6487 Add demo for ERS/ETRS scheme.
ecc5f7e8 Add demo for ERS/ETRS scheme.
ebea1e0e Update the backend for generality.
442ee0a7 Adjustments to ERS.
54676b0b Better bench.
946110d5 Improve benchmark for ERS.
9b97cf0f More experiments with GT membership checks.
e79a5781 Further fixes in FPX exponentiation.
f1452124 Polishing.
37f5cecc Implement 8-GLS method for BLS24.
ab14b575 Better GLV/GLS for curves and fields.
5887c2e2 Add hashing to BLS24 curves.
c4116a4d Memory bugs!
0e491e8b Square root in Fp4.
e99711b3 Faster cyclotomic squarings.
db2d6a9e Faster efficient membership tests again, getting there!
fe3ea6f9 Merge branch 'main' of github.com:relic-toolkit/relic
f1d9e3bf Better GT test for BLS24.
d524ff0f Update relic_ep_param.c
6cd1e3fc Add BLS12-383 curve and adjust backends.
73e4bde8 Make more general.
4b465952 Make subgroup membership tests less risky again.
26467be7 Combined low-level backends.
d2723fda Remove apparently useless CMake directive.
a970b292 Another type fix.
a20f81f0 Fix conditional compilation.
18eeb970 Merge branch 'main' of github.com:relic-toolkit/relic
29cd6315 Added new preset for BLS24 curve.
45a1bf0f Rename folder and preset.
f6634219 Make code a little more generic.
1cae37af Fix types.
a30eebc2 Fix error caused by previous merge.
49790b6c Fix type.
97ff7774 Merge pull request Chia-Network#199 from relic-toolkit/delegation
320774a2 Merge branch 'main' into delegation
c52bb96c Rename protocols.
8775b479 Add more benchmarks.
9149cead Fix membership tests.
4834f435 Use random points.
730bc944 More general choice of algs.
10168f0f Fix another memory issue.
0a265de4 Implement pairings over BLS24 and add glue code for protocols.
19dcfac7 Fix memory issues.
67abb197 Fix type mismatch.
634c0529 Stub for compression and adjustment for fp4_mul_frb().
48778406 Adjust benchmarks as well.
eda52e70 Complete implementation of Fp24.
3738c50d Add implementation of E(Fp4).
456e61a5 Extended Fp4 with new functions.
4c9be555 Rename variables to follow standard.
638291c6 Minor polishing.
52b316a6 Fix memory issue.
771e9f71 Replace curve BLS24-477 with BLS24-509.
3a9160b1 Fix copyright dates, add script.
0a19bdbb Removing include and list type.
d3645687 Add extendable ring signatures.
877f8e75 Fix memory issues.
999cd0c5 Add SoK protocols for discrete logarithms.
a689b8ff Add PoK protocols for dlogs.
aff5b254 Add new GHA configuration.
5f4bf29e Fix issues with constant-time GMP backend.
4e39e235 Remove unused variable.
6314936f Otimize GHA by reducing number of tests.
36c03729 Accelerate GHA by omitting excessive configurations.
4776b432 Change types and fix constant overflow.
173b674a Bug fixes detected by GHA.
de470937 Slightly more readable code.
65960446 Do not resize WSIZE after it was set once.
60008aa1 Remove printing artifact.
af425eca Fix test cases for trivial values of b.
9fa0f13a Rename config.
511bacef Add configurations for 8- and 16-bit microcontrollers to GHA.
784711bc Merge branch 'main' of github.com:relic-toolkit/relic
8d45773e Rename GHA config.
1a98c503 Refresh GHA configurations.
5daada8c Update README.md
5a5e2819 Merge pull request Chia-Network#197 from relic-toolkit/win64
bc11fc82 Fix documentation.
fda22d02 Reuse macros and simplify EASY backend.
69c51954 Fix more issues with BLAKE2.
03f86cb5 Rename bn_init -> bn_make to avoid clashing with OpenSSL.
43f2cd46 Fix issue with BLAKE2.
c457c28b Added Curve448 prime.
74a45c10 Compute the generator of G_T here.
63088b36 Merge pull request Chia-Network#194 from luozejiaqun/pcGtGen
1b9a2f93 Fix typo.
236330b2 Simplify generator getting for Gt.
23627901 Rename for clarity.
23175371 Merge branch 'win64' of github.com:relic-toolkit/relic into win64
ec0323d6 Attempt to fix Win64 crash.
1964462b More fixes for Win64, almost there.
c5619102 New fix for Win64.
eee28940 Fix compile issues on Win64.
70d29ddb Typo.
5cf20c4c Another attempt to make code more portable.
5d299329 Make code more portable.
1df86afd Attempt to abstract multiplication/division involving single digits.
ebf7c8da Remove another occurence of dbl_t for Win64.
11d4414e Another fix.
efded21a Fix compile error on Win64.
1862a1f2 Attempt to compile on WIN64.
bf2b8035 Formatting.
252a53d4 Simplify iterated squaring interface to save memory on context.
6e4aaa56 Attempt to fix Win64 crash.
85fc0d45 More fixes for Win64, almost there.
f2ac7567 New fix for Win64.
7e3433e6 Fix compile issues on Win64.
f205ef68 Typo.
45bdce9f Another attempt to make code more portable.
bb9f7b6d Make code more portable.
70cef2fb Attempt to abstract multiplication/division involving single digits.
879ae213 Remove another occurence of dbl_t for Win64.
328865bf Another fix.
ca718dea Fix compile error on Win64.
52af7c93 Merge branch 'win64' of github.com:relic-toolkit/relic into win64
1f6ec607 Attempt to compile on WIN64.
ec291eca Attempt to compile on WIN64.
9bee0e2f Improve detection for Windows 64.
d9ea26cf Improve detection for Windows 64.
b3e4bb6a Improve detection for Windows 64.
e6702621 Conditional ASM directives.
a6b49fe0 Change RNG for Windows build.
c2617189 Remove apparently seless directives from ASM in BLS12-381.
5f94a5ba One more try.
1e8748ca Restore GMP config.
d45fe501 More fixes.
a9051913 Another fix.
cee373b4 Fix typo in preset name.
f49a187f Add new configuration for GH Actions.
c7efde00 Minor tweak.
1c9ea9ed Fix further problems with padding in PKCS PIVX-Project#1.5 (no surprise).
83de89f7 Remove MSVC support for GMP.
02aba9fe Tweaks to GMP support.
5351e3ae Refactor fast reduction.
08b56edb Try more variants of GMP library name.
70f78c5e Final attempt before giving up.
f2e4760b Be more flexible with library names.
ad171c69 More details.
e823206f Be more descriptive about GMP location.
f0c10739 Going back to bash.
e55d01a7 Swap vcpkg commands.
53d495d9 Try to fix path.
7ce334de Windows uses backslash for dirs.
d32bded0 Try PowerShell now.
66de6363 Another attempt
78e74773 Try to fix include path for MSVC compilation.
924c20ea Another fix.
1f83fcca Fix hierarchy.
d724e5a8 Debug MSVC GMP install.
d562ed73 Again.
7bf116f7 Possible fix.
3e8f9e53 Another try.
1d368812 Fix typo.
54f857a0 Rename action.
dbc38931 Experiment with a different configuration.
ae4e09f4 (Much) Faster subgroup checks for BLS12 curves.
aca5315e Try to run CI on all branches.
0bfc2550 Be less dramatic about errors.
3a23142b Bump BLAKE2S to latest version.
8c030a57 Faster scalar multiplication in G2.
6e333f2a Make gt_exp_dig into a function and optimize subgroup membership more.
6d2901f2 Save some lines. :)
e1c2c139 Fix more problems with mem alloc.
840ea8fa More memory alloc.
babcb1b1 Memory allocation again.
fcbfcc69 Formatting and speedups.
f07f43ba Implement version with private inputs as well.
346af38d Formatting.
57ff4bd4 Exploit multi-pairing.
57f0c8ad Make date accurate.
03b9e559 Speedup using multi-pairing.
48125d66 Add pairing delegation protocols.
e54b04c9 Better conditional compilation.

git-subtree-dir: contrib/relic
git-subtree-split: e6209fd80e07203b865983faee635fa1f85d6c9f
  • Loading branch information
Fuzzbawls committed Apr 13, 2023
1 parent 914ee52 commit e9df715
Show file tree
Hide file tree
Showing 231 changed files with 14,355 additions and 2,368 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/16bit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Basic configuration (16 bits)

on:
push:
branches:
- '**' # all branches
pull_request:
branches:
- '**' # all branches

jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu Latest - GCC",
artifact: "linux-gcc.tar.xz",
os: ubuntu-latest,
cc: "gcc",
}
- {
name: "Ubuntu Latest - Clang",
artifact: "linux-clang.tar.xz",
os: ubuntu-latest,
cc: "clang",
}
steps:
- uses: actions/checkout@v2

- name: Run CMake (standard)
if: ${{ !(runner.os == 'Windows') }}
shell: bash
run: |
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DWSIZE=16 -DSEED= -DBENCH=0 -DTESTS=10 ..
- name: CMake Build
run: cmake --build build

- name: CMake Test
run: |
cd build
ctest --verbose .
97 changes: 97 additions & 0 deletions .github/workflows/32bit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Basic configuration (32 bits)

on:
push:
branches:
- '**' # all branches
pull_request:
branches:
- '**' # all branches

jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows Latest - MSVC",
artifact: "windows-msvc.tar.xz",
os: windows-latest,
cc: "cl",
}
- {
name: "Windows Latest - MinGW",
artifact: "windows-mingw.tar.xz",
os: windows-latest,
cc: "gcc"
}
- {
name: "Ubuntu Latest - GCC",
artifact: "linux-gcc.tar.xz",
os: ubuntu-latest,
cc: "gcc",
}
- {
name: "Ubuntu Latest - Clang",
artifact: "linux-clang.tar.xz",
os: ubuntu-latest,
cc: "clang",
}
- {
name: "MacOS Latest",
os: macos-latest,
cc: "clang",
}
steps:
- uses: actions/checkout@v2

- name: Set Windows enviroment
if: ${{ (runner.os == 'Windows') && (matrix.config.cc == 'cl') }}
uses: ilammy/msvc-dev-cmd@v1

- name: Set MinGW enviroment
if: ${{ (runner.os == 'Windows') && (matrix.config.cc == 'gcc') }}
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: >-
git
base-devel
gcc
cmake
update: true

- name: Run CMake (Win)
if: ${{ (runner.os == 'Windows') && (matrix.config.cc == 'cl') }}
shell: bash
run: |
mkdir build
cd build
cmake -DWSIZE=32 -DSEED= -DBENCH=0 -G "NMake Makefiles" ..
- name: Run CMake (MingW)
if: ${{ (runner.os == 'Windows') && (matrix.config.cc == 'gcc') }}
shell: bash
run: |
mkdir build
cd build
cmake -DWSIZE=32 -DSEED= -DBENCH=0 -G "MinGW Makefiles" ..
- name: Run CMake (standard)
if: ${{ !(runner.os == 'Windows') }}
shell: bash
run: |
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DWSIZE=32 -DSEED= -DBENCH=0 ..
- name: CMake Build
run: cmake --build build

- name: CMake Test
run: |
cd build
ctest --verbose .
48 changes: 48 additions & 0 deletions .github/workflows/8bit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Basic configuration (8 bits)

on:
push:
branches:
- '**' # all branches
pull_request:
branches:
- '**' # all branches

jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu Latest - GCC",
artifact: "linux-gcc.tar.xz",
os: ubuntu-latest,
cc: "gcc",
}
- {
name: "Ubuntu Latest - Clang",
artifact: "linux-clang.tar.xz",
os: ubuntu-latest,
cc: "clang",
}
steps:
- uses: actions/checkout@v2

- name: Run CMake (standard)
if: ${{ !(runner.os == 'Windows') }}
shell: bash
run: |
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DWSIZE=8 -DSEED= -DBENCH=0 -DTESTS=10 ..
- name: CMake Build
run: cmake --build build

- name: CMake Test
run: |
cd build
ctest --verbose .
91 changes: 91 additions & 0 deletions .github/workflows/bls12-381.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: BLS12-381 configuration (ASM)

on:
push:
branches:
- '**' # all branches
pull_request:
branches:
- '**' # all branches

jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
#- {
#name: "Windows Latest - MinGW",
#artifact: "windows-mingw.tar.xz",
#os: windows-latest,
#cc: "gcc"
#}
- {
name: "Ubuntu Latest - GCC",
artifact: "linux-gcc.tar.xz",
os: ubuntu-latest,
cc: "gcc",
}
- {
name: "Ubuntu Latest - Clang",
artifact: "linux-clang.tar.xz",
os: ubuntu-latest,
cc: "clang",
}
- {
name: "MacOS Latest",
os: macos-latest,
cc: "clang",
}
steps:
- uses: actions/checkout@v2

- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: sudo apt install libgmp-dev

- name: Install MacOS Dependencies
if: runner.os == 'MacOS'
run: brew install gmp

- name: Set MinGW enviroment
if: ${{ (runner.os == 'Windows') && (matrix.config.cc == 'gcc') }}
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: >-
git
base-devel
gcc
cmake
gmp
update: true

- name: Run CMake (MingW)
if: ${{ (runner.os == 'Windows') && (matrix.config.cc == 'gcc') }}
shell: bash
run: |
mkdir build
cd build
cmake -G "MinGW Makefiles" ..
../preset/x64-pbc-bls12-381.sh .
cmake -DSEED= -DBENCH=0 -DSTBIN=off -DRAND=HASHD .
- name: Run CMake (standard)
if: ${{ !(runner.os == 'Windows') }}
shell: bash
run: |
mkdir build
cd build
../preset/x64-pbc-bls12-381.sh ../
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DSEED= -DBENCH=0 .
- name: CMake Build
run: cmake --build build

- name: CMake Test
run: |
cd build
ctest --verbose .
14 changes: 8 additions & 6 deletions .github/workflows/push.yml → .github/workflows/easy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Continuous Integration
name: Basic configuration

on: [push, pull_request]
on:
push:
branches:
- '**' # all branches
pull_request:
branches:
- '**' # all branches

jobs:
build:
Expand Down Expand Up @@ -42,10 +48,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: sudo apt install libgmp-dev

- name: Set Windows enviroment
if: ${{ (runner.os == 'Windows') && (matrix.config.cc == 'cl') }}
uses: ilammy/msvc-dev-cmd@v1
Expand Down
Loading

0 comments on commit e9df715

Please sign in to comment.