瀏覽代碼

make types use pallas:: prefix instead of pasta::

narodnik 4 年之前
父節點
當前提交
47a1f0496a
共有 1 個文件被更改,包括 13 次插入13 次删除
  1. 13 13
      src/types.rs

+ 13 - 13
src/types.rs

@@ -1,27 +1,27 @@
 //! Type aliases used in the codebase.
 //! Type aliases used in the codebase.
 // Helpful for changing the curve and crypto we're using.
 // Helpful for changing the curve and crypto we're using.
 use halo2_gadgets::ecc::FixedPoints;
 use halo2_gadgets::ecc::FixedPoints;
-use pasta_curves as pasta;
+use pasta_curves::pallas;
 
 
 use crate::crypto::{constants::OrchardFixedBases, util::mod_r_p};
 use crate::crypto::{constants::OrchardFixedBases, util::mod_r_p};
 
 
-pub type DrkCircuitField = pasta::Fp;
+pub type DrkCircuitField = pallas::Base;
 
 
-pub type DrkTokenId = pasta::Fp;
-pub type DrkSerial = pasta::Fp;
+pub type DrkTokenId = pallas::Base;
+pub type DrkSerial = pallas::Base;
 
 
-pub type DrkCoin = pasta::Fp;
-pub type DrkCoinBlind = pasta::Fp;
+pub type DrkCoin = pallas::Base;
+pub type DrkCoinBlind = pallas::Base;
 
 
-pub type DrkNullifier = pasta::Fp;
+pub type DrkNullifier = pallas::Base;
 
 
-pub type DrkValue = pasta::Fp;
-pub type DrkScalar = pasta::Fq;
-pub type DrkValueBlind = pasta::Fq;
-pub type DrkValueCommit = pasta::Ep;
+pub type DrkValue = pallas::Base;
+pub type DrkScalar = pallas::Scalar;
+pub type DrkValueBlind = pallas::Scalar;
+pub type DrkValueCommit = pallas::Point;
 
 
-pub type DrkPublicKey = pasta::Ep;
-pub type DrkSecretKey = pasta::Fp;
+pub type DrkPublicKey = pallas::Point;
+pub type DrkSecretKey = pallas::Base;
 
 
 pub fn derive_public_key(s: DrkSecretKey) -> DrkPublicKey {
 pub fn derive_public_key(s: DrkSecretKey) -> DrkPublicKey {
     OrchardFixedBases::SpendAuthG.generator() * mod_r_p(s)
     OrchardFixedBases::SpendAuthG.generator() * mod_r_p(s)