1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright © 2023 Marvin Beckmann
//
// This file is part of qFALL-math.
//
// qFALL-math is free software: you can redistribute it and/or modify it under
// the terms of the Mozilla Public License Version 2.0 as published by the
// Mozilla Foundation. See <https://mozilla.org/en-US/MPL/2.0/>.
//! [`ModulusPolynomialRingZq`] is the context object for
//! [`PolynomialRingZq`](super::PolynomialRingZq).
//! This implementation uses the [FLINT](https://flintlib.org/) library.
use NTTBasisPolynomialRingZq;
use cratePolyOverZq;
use ;
/// [`ModulusPolynomialRingZq`] represents the modulus object for
/// [`PolynomialRingZq`](crate::integer_mod_q::PolynomialRingZq)
///
/// Attributes
/// - `modulus`: holds the specific content, i.e. the modulus `q` and f(X)
///
/// # Examples
/// ```
/// use qfall_math::integer_mod_q::ModulusPolynomialRingZq;
/// use qfall_math::integer_mod_q::PolyOverZq;
/// use std::str::FromStr;
///
/// // initialize X^2 + 1 mod 17, i.e. a polynomial with modulus
/// let poly_mod = PolyOverZq::from_str("3 1 0 1 mod 17").unwrap();
/// let modulus = ModulusPolynomialRingZq::from(poly_mod);
/// ```