Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'prov/src/main/java/org/spongycastle/pqc/jcajce/spec/RainbowPublicKeySpec.java')
-rw-r--r--prov/src/main/java/org/spongycastle/pqc/jcajce/spec/RainbowPublicKeySpec.java68
1 files changed, 68 insertions, 0 deletions
diff --git a/prov/src/main/java/org/spongycastle/pqc/jcajce/spec/RainbowPublicKeySpec.java b/prov/src/main/java/org/spongycastle/pqc/jcajce/spec/RainbowPublicKeySpec.java
new file mode 100644
index 00000000..ce79e9ab
--- /dev/null
+++ b/prov/src/main/java/org/spongycastle/pqc/jcajce/spec/RainbowPublicKeySpec.java
@@ -0,0 +1,68 @@
+package org.spongycastle.pqc.jcajce.spec;
+
+
+import java.security.spec.KeySpec;
+
+/**
+ * This class provides a specification for a RainbowSignature public key.
+ *
+ * @see KeySpec
+ */
+public class RainbowPublicKeySpec
+ implements KeySpec
+{
+ private short[][] coeffquadratic;
+ private short[][] coeffsingular;
+ private short[] coeffscalar;
+ private int docLength; // length of possible document to sign
+
+ /**
+ * Constructor
+ *
+ * @param docLength
+ * @param coeffquadratic
+ * @param coeffSingular
+ * @param coeffScalar
+ */
+ public RainbowPublicKeySpec(int docLength,
+ short[][] coeffquadratic, short[][] coeffSingular,
+ short[] coeffScalar)
+ {
+ this.docLength = docLength;
+ this.coeffquadratic = coeffquadratic;
+ this.coeffsingular = coeffSingular;
+ this.coeffscalar = coeffScalar;
+ }
+
+ /**
+ * @return the docLength
+ */
+ public int getDocLength()
+ {
+ return this.docLength;
+ }
+
+ /**
+ * @return the coeffquadratic
+ */
+ public short[][] getCoeffQuadratic()
+ {
+ return coeffquadratic;
+ }
+
+ /**
+ * @return the coeffsingular
+ */
+ public short[][] getCoeffSingular()
+ {
+ return coeffsingular;
+ }
+
+ /**
+ * @return the coeffscalar
+ */
+ public short[] getCoeffScalar()
+ {
+ return coeffscalar;
+ }
+}