Files
zeekayandHanzo Dev ac06110e68 Threshold FHE in the default build
The wallet sessions and the encrypted-policy gate run
luxfi/threshold/protocols/tfhe. The experimental_tfhe tag and the
not-implemented stub are gone.

Key generation runs across nodes: each samples its own contribution,
broadcasts the collective-key share and unicasts one Shamir point per peer,
then folds its inbox into a share. The reference polynomial comes from the
wallet and the committee in canonical order, and a message may only speak
for the position of the member that sent it.

Decryption collects contributions bound by digest to the ciphertext and
keeps a round open until they recombine; anything short is an error, which
the verifier reads as a denial. A go/ast gate refuses any call that would
form a whole FHE key.

go.mod needs the two dependency patches tagged, then `go get` and tidy.


Co-authored-by: Hanzo Dev <[email protected]>
2026-09-17 13:46:52 -07:00

72 lines
2.8 KiB
Go

// Copyright (c) 2026, Lux Industries Inc.
// SPDX-License-Identifier: BSD-3-Clause
// Package attest is a TRANSITION ADAPTER. The canonical attestation
// verifier was extracted into the orthogonal leaf module
// github.com/luxfi/cc (one verifier, depended on by mpc/tee/ai, coupled to
// none). New code — including all mpc-internal consumers (pkg/kms,
// pkg/attestation) — imports github.com/luxfi/cc/attest directly.
//
// This package exists ONLY so the single external consumer that is still
// pinned to a pre-extraction luxfi/mpc — github.com/luxfi/threshold v1.9.9,
// whose pkg/thresholdd/tee_options.go imports github.com/luxfi/mpc/cc/attest
// and references attest.KindNRAS, keeps building. threshold's main branch has
// already dropped this import (the TEE custody code moved to luxfi/tee), and
// threshold/protocols/tfhe is a real package again, so the next threshold tag
// carries both.
//
// Every symbol here is a zero-logic re-export (type aliases preserve type
// identity with the leaf — a value produced by github.com/luxfi/cc/attest is
// the SAME type as the one named here). REMOVE this package once threshold
// republishes against the leaf and mpc's tfhe dependency is resolved.
package attest
import cc "github.com/luxfi/cc/attest"
// Re-exported types. Type aliases ⇒ identical types to the leaf, so the
// kms.CompositeAttestation release-gate interface is satisfied by values
// from either import path.
type (
Kind = cc.Kind
Option = cc.Option
Verifier = cc.Verifier
VerifiedReport = cc.VerifiedReport
SEVSNP = cc.SEVSNP
TDX = cc.TDX
NVTrust = cc.NVTrust
)
// Re-exported kinds. KindNRAS is the deprecated name for the NVIDIA GPU
// kind; it is retained ONLY for threshold v1.9.9 (which references it) and
// resolves to the canonical KindNVTrust value. New code uses KindNVTrust.
const (
KindSEVSNP = cc.KindSEVSNP
KindTDX = cc.KindTDX
KindNVTrust = cc.KindNVTrust
// Deprecated: transitional alias for github.com/luxfi/threshold v1.9.9.
KindNRAS = cc.KindNVTrust
)
// Re-exported sentinel errors. Same values ⇒ errors.Is works across both
// import paths.
var (
ErrUnsupportedKind = cc.ErrUnsupportedKind
ErrInvalidEvidence = cc.ErrInvalidEvidence
ErrChainInvalid = cc.ErrChainInvalid
ErrSignatureInvalid = cc.ErrSignatureInvalid
ErrPolicy = cc.ErrPolicy
ErrNotImplemented = cc.ErrNotImplemented
)
// Re-exported constructors / entry points.
var (
Dispatch = cc.Dispatch
WithExpectedReportData = cc.WithExpectedReportData
WithExpectedMeasurement = cc.WithExpectedMeasurement
WithNow = cc.WithNow
WithKDSGetter = cc.WithKDSGetter
WithNVTrustRIM = cc.WithNVTrustRIM
WithNVTrustTrustRoots = cc.WithNVTrustTrustRoots
)