|
| 1 | +/* |
| 2 | + * Copyright (C) 2024, Stephan Mueller <smueller@chronox.de> |
| 3 | + * |
| 4 | + * License: see LICENSE file in root directory |
| 5 | + * |
| 6 | + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED |
| 7 | + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 8 | + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF |
| 9 | + * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE |
| 10 | + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 11 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
| 12 | + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 13 | + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 14 | + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 15 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE |
| 16 | + * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH |
| 17 | + * DAMAGE. |
| 18 | + */ |
| 19 | +/* |
| 20 | + * This file is derived from https://github.com/Ji-Peng/PQRV which uses the |
| 21 | + * following license. |
| 22 | + * |
| 23 | + * The MIT license, the text of which is below, applies to PQRV in general. |
| 24 | + * |
| 25 | + * Copyright (c) 2024 Jipeng Zhang (jp-zhang@outlook.com) |
| 26 | + * SPDX-License-Identifier: MIT |
| 27 | + * |
| 28 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 29 | + * of this software and associated documentation files (the "Software"), to deal |
| 30 | + * in the Software without restriction, including without limitation the rights |
| 31 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 32 | + * copies of the Software, and to permit persons to whom the Software is |
| 33 | + * furnished to do so, subject to the following conditions: |
| 34 | + * |
| 35 | + * The above copyright notice and this permission notice shall be included in all |
| 36 | + * copies or substantial portions of the Software. |
| 37 | + * |
| 38 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 39 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 40 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 41 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 42 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 43 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 44 | + * SOFTWARE. |
| 45 | + */ |
| 46 | + |
| 47 | +#ifndef DILITHIUM_NTT_RVV_H |
| 48 | +#define DILITHIUM_NTT_RVV_H |
| 49 | + |
| 50 | +#include "dilithium_consts_rvv.h" |
| 51 | + |
| 52 | +extern void dilithium_ntt_8l_rvv(int32_t *r, const int32_t *qdata); |
| 53 | +extern void dilithium_intt_8l_rvv(int32_t *r, const int32_t *qdata); |
| 54 | +extern void dilithium_poly_basemul_8l_rvv(int32_t *r, const int32_t *a, |
| 55 | + const int32_t *b); |
| 56 | +extern void dilithium_poly_basemul_acc_8l_rvv(int32_t *r, const int32_t *a, |
| 57 | + const int32_t *b); |
| 58 | +extern void dilithium_ntt2normal_order_8l_rvv(int32_t *r, const int32_t *qdata); |
| 59 | +extern void dilithium_normal2ntt_order_8l_rvv(int32_t *r, const int32_t *qdata); |
| 60 | +extern void dilithium_poly_reduce_rvv(int32_t *r); |
| 61 | + |
| 62 | +#endif /* DILITHIUM_NTT_RVV_H */ |
0 commit comments