Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actions/config-variations/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ runs:
kat: true
acvp: true
opt: ${{ inputs.opt }}
examples: true
extra_args: "--exclude-example basic_deterministic"
- name: "PCT enabled + broken"
if: ${{ inputs.tests == 'all' || contains(inputs.tests, 'pct-enabled-broken') }}
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ jobs:
- name: basic
run: |
CFLAGS="-O0" make run -C examples/basic
- name: basic_deterministic
run: |
CFLAGS="-O0" make run -C examples/basic_deterministic
- name: bring_your_own_fips202
run: |
CFLAGS="-O0" make run -C examples/bring_your_own_fips202
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ jobs:
c23: True
opt: all
examples: true
- name: clang-21
shell: ci_clang21
darwin: True
c17: True
c23: True
opt: all
examples: true
# CPU flags are not correctly passed to the zig assembler
# https://github.com/ziglang/zig/issues/23576
# We therefore only test the C backend
Expand Down Expand Up @@ -284,6 +291,13 @@ jobs:
c23: True
examples: False
opt: no_opt
- name: zig-0.15
shell: ci_zig0_15
darwin: True
c17: True
c23: True
examples: False
opt: no_opt
runs-on: ${{ matrix.target.runner }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ct-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- ci_valgrind-varlat_clang18
- ci_valgrind-varlat_clang19
- ci_valgrind-varlat_clang20
- ci_valgrind-varlat_clang21
- ci_valgrind-varlat_gcc48
- ci_valgrind-varlat_gcc49
- ci_valgrind-varlat_gcc7
Expand Down Expand Up @@ -62,7 +63,7 @@ jobs:
valgrind_flags: --variable-latency-errors=yes
- name: Build and run test (-Ofast)
# -Ofast got deprecated in clang19; -O3 -ffast-math should be used instead
if: ${{ matrix.nix-shell != 'ci_valgrind-varlat_clang19' && matrix.nix-shell != 'ci_valgrind-varlat_clang20' }}
if: ${{ matrix.nix-shell != 'ci_valgrind-varlat_clang19' && matrix.nix-shell != 'ci_valgrind-varlat_clang20' && matrix.nix-shell != 'ci_valgrind-varlat_clang21'}}
uses: ./.github/actions/ct-test
with:
cflags: -Ofast -DMLK_CONFIG_KEYGEN_PCT
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,15 @@ jobs:
fail-fast: false
matrix:
target:
# nixpkgs requires 2.18 since August 2025, see
# https://github.com/NixOS/nixpkgs/pull/428076
# TODO: Re-enable tests on Ubuntu 22 once nix has been updated to >= 2.18
# - runner: ubuntu-22.04
# container:
# install: 'apt'
- runner: ubuntu-latest
container: nixos/nix:2.6.1
container: nixos/nix:2.18.0
install: 'native'
- runner: ubuntu-22.04
container:
install: 'apt'
- runner: ubuntu-24.04
container:
install: 'apt'
Expand Down
2 changes: 2 additions & 0 deletions BIBLIOGRAPHY.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ source code and documentation.
- National Institute of Standards and Technology
* URL: https://csrc.nist.gov/projects/cryptographic-module-validation-program/fips-140-3-ig-announcements
* Referenced from:
- [examples/basic_deterministic/mlkem_native/custom_no_randomized_config.h](examples/basic_deterministic/mlkem_native/custom_no_randomized_config.h)
- [integration/liboqs/config_aarch64.h](integration/liboqs/config_aarch64.h)
- [integration/liboqs/config_c.h](integration/liboqs/config_c.h)
- [integration/liboqs/config_ppc64le.h](integration/liboqs/config_ppc64le.h)
- [integration/liboqs/config_x86_64.h](integration/liboqs/config_x86_64.h)
- [mlkem/src/config.h](mlkem/src/config.h)
- [mlkem/src/kem.c](mlkem/src/kem.c)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ any of the open issues. Here are some things to get you started.

We specify the development environment for mlkem-native using `nix`. If you want to help develop mlkem-native, please
use `nix`. We recommend using the latest Nix version provided by the [nix installer
script](https://nixos.org/download/), but we currently support all Nix versions >= 2.6.
script](https://nixos.org/download/), but we currently support all Nix versions >= 2.18.

All the development and build dependencies are specified in [flake.nix](flake.nix). To execute a bash shell, run
```bash
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ clean:
-make clean -C examples/bring_your_own_fips202 >/dev/null
-make clean -C examples/custom_backend >/dev/null
-make clean -C examples/basic >/dev/null
-make clean -C examples/basic_deterministic >/dev/null
-make clean -C examples/monolithic_build >/dev/null
-make clean -C examples/monolithic_build_native >/dev/null
-make clean -C examples/monolithic_build_multilevel >/dev/null
Expand Down
6 changes: 6 additions & 0 deletions dev/ppc64le/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[//]: # (SPDX-License-Identifier: CC-BY-4.0)

# ppc64le backend (little endian)

This directory contains a native backend for little endian POWER 8 (ppc64le) and above systems.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed before, I couldn't yet run the code with power8 emulation, and I think you mentioned you only tested power9 and power10. Are you sure it works on power8?


53 changes: 53 additions & 0 deletions dev/ppc64le/meta.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright (c) The mlkem-native project authors
* SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
*/

#ifndef MLK_DEV_PPC64LE_META_H
#define MLK_DEV_PPC64LE_META_H

/* Identifier for this backend so that source and assembly files
* in the build can be appropriately guarded. */
#define MLK_ARITH_BACKEND_PPC64LE_DEFAULT

#define MLK_ARITH_BACKEND_NAME PPC64LE_DEFAULT

/* Set of primitives that this backend replaces */
#define MLK_USE_NATIVE_NTT
#define MLK_USE_NATIVE_INTT
#define MLK_USE_NATIVE_POLY_REDUCE
#define MLK_USE_NATIVE_POLY_TOMONT

#if !defined(__ASSEMBLER__)
#include <string.h>
#include "../../common.h"
#include "../../params.h"
#include "../api.h"
#include "src/arith_native_ppc64le.h"

static MLK_INLINE int mlk_ntt_native(int16_t data[MLKEM_N])
{
mlk_ntt_ppc(data, mlk_ppc_qdata);
return MLK_NATIVE_FUNC_SUCCESS;
}

static MLK_INLINE int mlk_intt_native(int16_t data[MLKEM_N])
{
mlk_intt_ppc(data, mlk_ppc_qdata);
return MLK_NATIVE_FUNC_SUCCESS;
}

static MLK_INLINE int mlk_poly_reduce_native(int16_t data[MLKEM_N])
{
mlk_reduce_ppc(data, mlk_ppc_qdata);
return MLK_NATIVE_FUNC_SUCCESS;
}

static MLK_INLINE int mlk_poly_tomont_native(int16_t data[MLKEM_N])
{
mlk_poly_tomont_ppc(data, mlk_ppc_qdata);
return MLK_NATIVE_FUNC_SUCCESS;
}
#endif /* !__ASSEMBLER__ */

#endif /* !MLK_DEV_PPC64LE_META_H */
24 changes: 24 additions & 0 deletions dev/ppc64le/src/arith_native_ppc64le.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2024-2025 The mlkem-native project authors
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef MLK_DEV_PPC64LE_SRC_ARITH_NATIVE_PPC64LE_H
#define MLK_DEV_PPC64LE_SRC_ARITH_NATIVE_PPC64LE_H

#include <stdint.h>
#include "../../../common.h"
#include "consts.h"

#define mlk_ntt_ppc MLK_NAMESPACE(ntt_ppc)
void mlk_ntt_ppc(int16_t *, const int16_t *);

#define mlk_intt_ppc MLK_NAMESPACE(intt_ppc)
void mlk_intt_ppc(int16_t *, const int16_t *);

#define mlk_reduce_ppc MLK_NAMESPACE(reduce_ppc)
void mlk_reduce_ppc(int16_t *r, const int16_t *);

#define mlk_poly_tomont_ppc MLK_NAMESPACE(poly_tomont_ppc)
void mlk_poly_tomont_ppc(int16_t *, const int16_t *);

#endif /* !MLK_DEV_PPC64LE_SRC_ARITH_NATIVE_PPC64LE_H */
155 changes: 155 additions & 0 deletions dev/ppc64le/src/consts.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
/*
* Copyright (c) The mlkem-native project authors
* SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
*/

#include "../../../common.h"

#if defined(MLK_ARITH_BACKEND_PPC64LE_DEFAULT) && \
!defined(MLK_CONFIG_MULTILEVEL_NO_SHARED)

#include "consts.h"

MLK_ALIGN const int16_t mlk_ppc_qdata[1568] = {
/* -Q */
-3329, -3329, -3329, -3329, -3329, -3329, -3329, -3329,
/* QINV */
-3327, -3327, -3327, -3327, -3327, -3327, -3327, -3327,
/* Q */
3329, 3329, 3329, 3329, 3329, 3329, 3329, 3329,
/* const 20159 for reduce.S and intt */
20159, 20159, 20159, 20159, 20159, 20159, 20159, 20159,
/* const 1441 for intt */
1441, 1441, 1441, 1441, 1441, 1441, 1441, 1441,
/* for poly_tomont.S */
1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353,
/* zetas */
/* For ntt Len=128, offset 96 */
-758, -758, -758, -758, -758, -758, -758, -758, -359, -359, -359, -359,
-359, -359, -359, -359, -1517, -1517, -1517, -1517, -1517, -1517, -1517,
-1517, 1493, 1493, 1493, 1493, 1493, 1493, 1493, 1493, 1422, 1422, 1422,
1422, 1422, 1422, 1422, 1422, 287, 287, 287, 287, 287, 287, 287, 287, 202,
202, 202, 202, 202, 202, 202, 202, -171, -171, -171, -171, -171, -171, -171,
-171, 622, 622, 622, 622, 622, 622, 622, 622, 1577, 1577, 1577, 1577, 1577,
1577, 1577, 1577, 182, 182, 182, 182, 182, 182, 182, 182, 962, 962, 962,
962, 962, 962, 962, 962, -1202, -1202, -1202, -1202, -1202, -1202, -1202,
-1202, -1474, -1474, -1474, -1474, -1474, -1474, -1474, -1474, 1468, 1468,
1468, 1468, 1468, 1468, 1468, 1468, 573, 573, 573, 573, 573, 573, 573, 573,
-1325, -1325, -1325, -1325, -1325, -1325, -1325, -1325, 264, 264, 264, 264,
264, 264, 264, 264, 383, 383, 383, 383, 383, 383, 383, 383, -829, -829,
-829, -829, -829, -829, -829, -829, 1458, 1458, 1458, 1458, 1458, 1458,
1458, 1458, -1602, -1602, -1602, -1602, -1602, -1602, -1602, -1602, -130,
-130, -130, -130, -130, -130, -130, -130, -681, -681, -681, -681, -681,
-681, -681, -681, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 732, 732,
732, 732, 732, 732, 732, 732, 608, 608, 608, 608, 608, 608, 608, 608, -1542,
-1542, -1542, -1542, -1542, -1542, -1542, -1542, 411, 411, 411, 411, 411,
411, 411, 411, -205, -205, -205, -205, -205, -205, -205, -205, -1571, -1571,
-1571, -1571, -1571, -1571, -1571, -1571, 1223, 1223, 1223, 1223, 1223,
1223, 1223, 1223, 652, 652, 652, 652, 652, 652, 652, 652, -552, -552, -552,
-552, -552, -552, -552, -552, 1015, 1015, 1015, 1015, 1015, 1015, 1015,
1015, -1293, -1293, -1293, -1293, -1293, -1293, -1293, -1293, 1491, 1491,
1491, 1491, 1491, 1491, 1491, 1491, -282, -282, -282, -282, -282, -282,
-282, -282, -1544, -1544, -1544, -1544, -1544, -1544, -1544, -1544, 516,
516, 516, 516, 516, 516, 516, 516, -8, -8, -8, -8, -8, -8, -8, -8, -320,
-320, -320, -320, -320, -320, -320, -320, -666, -666, -666, -666, -666,
-666, -666, -666, -1618, -1618, -1618, -1618, -1618, -1618, -1618, -1618,
-1162, -1162, -1162, -1162, -1162, -1162, -1162, -1162, 126, 126, 126, 126,
126, 126, 126, 126, 1469, 1469, 1469, 1469, 1469, 1469, 1469, 1469, -853,
-853, -853, -853, -853, -853, -853, -853, -90, -90, -90, -90, -90, -90, -90,
-90, -271, -271, -271, -271, -271, -271, -271, -271, 830, 830, 830, 830,
830, 830, 830, 830, 107, 107, 107, 107, 107, 107, 107, 107, -1421, -1421,
-1421, -1421, -1421, -1421, -1421, -1421, -247, -247, -247, -247, -247,
-247, -247, -247, -951, -951, -951, -951, -951, -951, -951, -951, -398,
-398, -398, -398, -398, -398, -398, -398, 961, 961, 961, 961, 961, 961, 961,
961, -1508, -1508, -1508, -1508, -1508, -1508, -1508, -1508, -725, -725,
-725, -725, -725, -725, -725, -725, 448, 448, 448, 448, 448, 448, 448, 448,
-1065, -1065, -1065, -1065, -1065, -1065, -1065, -1065, 677, 677, 677, 677,
677, 677, 677, 677, -1275, -1275, -1275, -1275, -1275, -1275, -1275, -1275,
/* For intt Len=2, offset IZETA_NTT_OFFSET64 */
-1103, -1103, -1103, -1103, 430, 430, 430, 430, 555, 555, 555, 555, 843,
843, 843, 843, -1251, -1251, -1251, -1251, 871, 871, 871, 871, 1550, 1550,
1550, 1550, 105, 105, 105, 105, 422, 422, 422, 422, 587, 587, 587, 587, 177,
177, 177, 177, -235, -235, -235, -235, -291, -291, -291, -291, -460, -460,
-460, -460, 1574, 1574, 1574, 1574, 1653, 1653, 1653, 1653, -246, -246,
-246, -246, 778, 778, 778, 778, 1159, 1159, 1159, 1159, -147, -147, -147,
-147, -777, -777, -777, -777, 1483, 1483, 1483, 1483, -602, -602, -602,
-602, 1119, 1119, 1119, 1119, -1590, -1590, -1590, -1590, 644, 644, 644,
644, -872, -872, -872, -872, 349, 349, 349, 349, 418, 418, 418, 418, 329,
329, 329, 329, -156, -156, -156, -156, -75, -75, -75, -75, 817, 817, 817,
817, 1097, 1097, 1097, 1097, 603, 603, 603, 603, 610, 610, 610, 610, 1322,
1322, 1322, 1322, -1285, -1285, -1285, -1285, -1465, -1465, -1465, -1465,
384, 384, 384, 384, -1215, -1215, -1215, -1215, -136, -136, -136, -136,
1218, 1218, 1218, 1218, -1335, -1335, -1335, -1335, -874, -874, -874, -874,
220, 220, 220, 220, -1187, -1187, -1187, -1187, -1659, -1659, -1659, -1659,
-1185, -1185, -1185, -1185, -1530, -1530, -1530, -1530, -1278, -1278, -1278,
-1278, 794, 794, 794, 794, -1510, -1510, -1510, -1510, -854, -854, -854,
-854, -870, -870, -870, -870, 478, 478, 478, 478, -108, -108, -108, -108,
-308, -308, -308, -308, 996, 996, 996, 996, 991, 991, 991, 991, 958, 958,
958, 958, -1460, -1460, -1460, -1460, 1522, 1522, 1522, 1522, 1628, 1628,
1628, 1628,
/* For intt Len=2, offset IZETA_NTT_OFFSET127 */
1628, 1628, 1628, 1628, 1522, 1522, 1522, 1522, -1460, -1460, -1460, -1460,
958, 958, 958, 958, 991, 991, 991, 991, 996, 996, 996, 996, -308, -308,
-308, -308, -108, -108, -108, -108, 478, 478, 478, 478, -870, -870, -870,
-870, -854, -854, -854, -854, -1510, -1510, -1510, -1510, 794, 794, 794,
794, -1278, -1278, -1278, -1278, -1530, -1530, -1530, -1530, -1185, -1185,
-1185, -1185, -1659, -1659, -1659, -1659, -1187, -1187, -1187, -1187, 220,
220, 220, 220, -874, -874, -874, -874, -1335, -1335, -1335, -1335, 1218,
1218, 1218, 1218, -136, -136, -136, -136, -1215, -1215, -1215, -1215, 384,
384, 384, 384, -1465, -1465, -1465, -1465, -1285, -1285, -1285, -1285, 1322,
1322, 1322, 1322, 610, 610, 610, 610, 603, 603, 603, 603, 1097, 1097, 1097,
1097, 817, 817, 817, 817, -75, -75, -75, -75, -156, -156, -156, -156, 329,
329, 329, 329, 418, 418, 418, 418, 349, 349, 349, 349, -872, -872, -872,
-872, 644, 644, 644, 644, -1590, -1590, -1590, -1590, 1119, 1119, 1119,
1119, -602, -602, -602, -602, 1483, 1483, 1483, 1483, -777, -777, -777,
-777, -147, -147, -147, -147, 1159, 1159, 1159, 1159, 778, 778, 778, 778,
-246, -246, -246, -246, 1653, 1653, 1653, 1653, 1574, 1574, 1574, 1574,
-460, -460, -460, -460, -291, -291, -291, -291, -235, -235, -235, -235, 177,
177, 177, 177, 587, 587, 587, 587, 422, 422, 422, 422, 105, 105, 105, 105,
1550, 1550, 1550, 1550, 871, 871, 871, 871, -1251, -1251, -1251, -1251, 843,
843, 843, 843, 555, 555, 555, 555, 430, 430, 430, 430, -1103, -1103, -1103,
-1103,
/* For intt Len=4 and others, offset IZETA_NTT_OFFSET63 */
-1275, -1275, -1275, -1275, -1275, -1275, -1275, -1275, 677, 677, 677, 677,
677, 677, 677, 677, -1065, -1065, -1065, -1065, -1065, -1065, -1065, -1065,
448, 448, 448, 448, 448, 448, 448, 448, -725, -725, -725, -725, -725, -725,
-725, -725, -1508, -1508, -1508, -1508, -1508, -1508, -1508, -1508, 961,
961, 961, 961, 961, 961, 961, 961, -398, -398, -398, -398, -398, -398, -398,
-398, -951, -951, -951, -951, -951, -951, -951, -951, -247, -247, -247,
-247, -247, -247, -247, -247, -1421, -1421, -1421, -1421, -1421, -1421,
-1421, -1421, 107, 107, 107, 107, 107, 107, 107, 107, 830, 830, 830, 830,
830, 830, 830, 830, -271, -271, -271, -271, -271, -271, -271, -271, -90,
-90, -90, -90, -90, -90, -90, -90, -853, -853, -853, -853, -853, -853, -853,
-853, 1469, 1469, 1469, 1469, 1469, 1469, 1469, 1469, 126, 126, 126, 126,
126, 126, 126, 126, -1162, -1162, -1162, -1162, -1162, -1162, -1162, -1162,
-1618, -1618, -1618, -1618, -1618, -1618, -1618, -1618, -666, -666, -666,
-666, -666, -666, -666, -666, -320, -320, -320, -320, -320, -320, -320,
-320, -8, -8, -8, -8, -8, -8, -8, -8, 516, 516, 516, 516, 516, 516, 516,
516, -1544, -1544, -1544, -1544, -1544, -1544, -1544, -1544, -282, -282,
-282, -282, -282, -282, -282, -282, 1491, 1491, 1491, 1491, 1491, 1491,
1491, 1491, -1293, -1293, -1293, -1293, -1293, -1293, -1293, -1293, 1015,
1015, 1015, 1015, 1015, 1015, 1015, 1015, -552, -552, -552, -552, -552,
-552, -552, -552, 652, 652, 652, 652, 652, 652, 652, 652, 1223, 1223, 1223,
1223, 1223, 1223, 1223, 1223, -1571, -1571, -1571, -1571, -1571, -1571,
-1571, -1571, -205, -205, -205, -205, -205, -205, -205, -205, 411, 411, 411,
411, 411, 411, 411, 411, -1542, -1542, -1542, -1542, -1542, -1542, -1542,
-1542, 608, 608, 608, 608, 608, 608, 608, 608, 732, 732, 732, 732, 732, 732,
732, 732, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, -681, -681, -681,
-681, -681, -681, -681, -681, -130, -130, -130, -130, -130, -130, -130,
-130, -1602, -1602, -1602, -1602, -1602, -1602, -1602, -1602, 1458, 1458,
1458, 1458, 1458, 1458, 1458, 1458, -829, -829, -829, -829, -829, -829,
-829, -829, 383, 383, 383, 383, 383, 383, 383, 383, 264, 264, 264, 264, 264,
264, 264, 264, -1325, -1325, -1325, -1325, -1325, -1325, -1325, -1325, 573,
573, 573, 573, 573, 573, 573, 573, 1468, 1468, 1468, 1468, 1468, 1468, 1468,
1468, -1474, -1474, -1474, -1474, -1474, -1474, -1474, -1474, -1202, -1202,
-1202, -1202, -1202, -1202, -1202, -1202, 962, 962, 962, 962, 962, 962, 962,
962, 182, 182, 182, 182, 182, 182, 182, 182, 1577, 1577, 1577, 1577, 1577,
1577, 1577, 1577, 622, 622, 622, 622, 622, 622, 622, 622, -171, -171, -171,
-171, -171, -171, -171, -171, 202, 202, 202, 202, 202, 202, 202, 202, 287,
287, 287, 287, 287, 287, 287, 287, 1422, 1422, 1422, 1422, 1422, 1422, 1422,
1422, 1493, 1493, 1493, 1493, 1493, 1493, 1493, 1493, -1517, -1517, -1517,
-1517, -1517, -1517, -1517, -1517, -359, -359, -359, -359, -359, -359, -359,
-359, -758, -758, -758, -758, -758, -758, -758, -758};

#endif /* MLK_ARITH_BACKEND_PPC64LE_DEFAULT && \
!MLK_CONFIG_MULTILEVEL_NO_SHARED */
26 changes: 26 additions & 0 deletions dev/ppc64le/src/consts.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (c) The mlkem-native project authors
* SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
*/

#ifndef MLK_DEV_PPC64LE_SRC_CONSTS_H
#define MLK_DEV_PPC64LE_SRC_CONSTS_H
#include "../../../common.h"

#define NQ_OFFSET 0
#define QINV_OFFSET 16
#define Q_OFFSET 32
#define C20159_OFFSET 48
#define C1441_OFFSET 64
#define C1353_OFFSET 80
#define ZETA_NTT_OFFSET 96
#define ZETA_NTT_OFFSET64 1104
#define IZETA_NTT_OFFSET127 1616
#define IZETA_NTT_OFFSET63 2128

#ifndef __ASSEMBLER__
#define mlk_ppc_qdata MLK_NAMESPACE(ppc_qdata)
extern const int16_t mlk_ppc_qdata[];
#endif

#endif /* !MLK_DEV_PPC64LE_SRC_CONSTS_H */
Loading