Rearrange the halo2 code, and some cleanup
Dependencies
- [2]
B27NZRDFInitial commit, with start of some Halo2 junk. - [3]
YR752KCD - [4]
RFFHFSSFIgnore cabal build output
Change contents
- file move: Halo2 → halo2
- file addition: halo2.cabal[2.832]
cabal-version: 2.4name: halo2version: 0.1.0.0synopsis: Playing with Halo-y things.-- description:homepage: https://nest.pijul.com/sellout/crypto-junkbug-reports: https://nest.pijul.com/sellout/crypto-junk/discussionslicense: AGPL-3.0-or-laterauthor: Greg Pfeilmaintainer: greg@technomadic.orgcopyright: 2022 Greg Pfeilcategory: Cryptographyextra-source-files: CHANGELOG.mdlibraryexposed-modules: PLONKishghc-options: -Weverythingbuild-depends: base, containers, fin, vecdefault-language: Haskell2010 - edit in halo2/PLONKish.hs at line 10
NoImplicitPrelude, - edit in halo2/PLONKish.hs at line 12
Safe, - replacement in halo2/PLONKish.hs at line 16
module Halo2.PLONKishmodule PLONKish - edit in halo2/PLONKish.hs at line 33
import Control.Applicative (Applicative (..))import Control.Category (Category(..)) - replacement in halo2/PLONKish.hs at line 37
import Data.Either.Combinators (maybeToLeft)import Data.Eq (Eq (..)) - replacement in halo2/PLONKish.hs at line 39
import Data.Foldable (toList)import Data.Foldable (Foldable (..))import Data.Functor (Functor (..)) - replacement in halo2/PLONKish.hs at line 44
import Data.Maybe (catMaybes)import Data.Maybe (Maybe (..), catMaybes, maybe)import Data.Ord (Ord (..)) - replacement in halo2/PLONKish.hs at line 47
import Data.Semigroup (Sum (..))import Data.Semigroup (Semigroup (..), Sum (..)) - edit in halo2/PLONKish.hs at line 50
import Data.Traversable (Traversable)import Data.Tuple qualified as Tuple - edit in halo2/PLONKish.hs at line 58
import Prelude (Bool, Either (..), Integer, Num (..), Show (..), flip, ($)) - replacement in halo2/PLONKish.hs at line 223
maybeToLeft( circuit {maybe( pure $ circuit { - edit in halo2/PLONKish.hs at line 229
Left - replacement in halo2/PLONKish.hs at line 247
if checkEqualityColumn config (fst x)if checkEqualityColumn config (Tuple.fst x) - replacement in halo2/PLONKish.hs at line 250
Just . IllegalEqualityColumn (fst x) $Just . IllegalEqualityColumn (Tuple.fst x) $ - replacement in halo2/PLONKish.hs at line 253
-- | This builds an elliptic curve from the two coefficients, returning a-- function that, given the x component of a point will return the positive y-- component. The negative component can be found via point inversion.ellipticCurve :: Field f => f -> f -> f -> fellipticCurve a b x = sqrt $ x ** 3 + a * x + b-- -- | This builds an elliptic curve from the two coefficients, returning a-- -- function that, given the x component of a point will return the positive y-- -- component. The negative component can be found via point inversion.-- ellipticCurve :: Field f => f -> f -> f -> f-- ellipticCurve a b x = sqrt $ x ** 3 + a * x + b - replacement in halo2/PLONKish.hs at line 259
type F_101 = ()-- type F_101 = () - replacement in halo2/PLONKish.hs at line 261
meh :: F_101 -> F_101meh = ellipticCurve 0 3-- meh :: F_101 -> F_101-- meh = ellipticCurve 0 3 - replacement in halo2/PLONKish.hs at line 264
type ProvingKey = ()-- type ProvingKey = () - replacement in halo2/PLONKish.hs at line 266
type VerificationKey = ()-- type VerificationKey = () - replacement in halo2/PLONKish.hs at line 268
generateProvingKey :: Circuit f c r mcd -> ProvingKeygenerateProvingKey = _-- generateProvingKey :: Circuit f c r mcd -> ProvingKey-- generateProvingKey = _ - replacement in halo2/PLONKish.hs at line 271
generateVerificationKey :: Circuit f c r mcd -> VerificationKeygenerateVerificationKey = _[2.9558]-- generateVerificationKey :: Circuit f c r mcd -> VerificationKey-- generateVerificationKey = _ - file addition: cabal.project[3.1]
packages:./halo2/halo2.cabal - file addition: README.md[3.1]
# Crypto(graphy) JunkVarious packages playing with different crypto primitives, schemes, etc. in Haskell.Probably none of it works. Mostly meant to look pretty.If you do manage to depend on one of these packages, the modules are meant to be used with [package-qualified imports](https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/package_qualified_imports.html?highlight=package%20qualified). E.g.,```haskell{-# language PackageImports #-}import "halo2" PLONKish.hs```