Documentation ¶
Index ¶
- func FinishTransaction(t *transaction.Transaction) (err error)
- func GetUpdatedBalance(tx *transaction.Transaction, balanceSender, balanceReceipt *rlwe.Ciphertext) (updatedSender *rlwe.Ciphertext, updatedReceipt *rlwe.Ciphertext, err error)
- func GetUpdatedReceiptBalance(tx *transaction.Transaction, balance *rlwe.Ciphertext) (updated *rlwe.Ciphertext, err error)
- func GetUpdatedSenderBalance(tx *transaction.Transaction, balance *rlwe.Ciphertext) (updated *rlwe.Ciphertext, err error)
- func InitializeNewReceiptPKTransaction(t *transaction.Transaction) (err error)
- func InitializeNewSenderPKTransaction(t *transaction.Transaction) (err error)
- func KeySwitchReceiptToSender(t *transaction.Transaction, swk *rlwe.SwitchingKey) (err error)
- func KeySwitchSenderToReceipt(t *transaction.Transaction, swk *rlwe.SwitchingKey) (err error)
- func NewEmptyEvaluator() ckks.Evaluator
- func ReEncryptCTWithSwk(ctIn *rlwe.Ciphertext, swk *rlwe.SwitchingKey) (ctOut *rlwe.Ciphertext, err error)
- func Recover(f func()) (err error)
- func RequestSwitchingKey(uIn, uOut *uuid.UUID, caUrl string) (swk *rlwe.SwitchingKey, err error)
- func ValidateSignatureBase(msg []byte, sig []byte, pk *ecdsa.PublicKey) (isValid bool)
- func ValidateSignatureForAcceptCipherText(ct interface{}, sig []byte, pk *ecdsa.PublicKey) (isValid bool, err error)
- func ValidateSignatureForCipherText(ct interface{}, sig []byte, pk *ecdsa.PublicKey) (isValid bool, err error)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FinishTransaction ¶
func FinishTransaction(t *transaction.Transaction) (err error)
FinishTransaction 将交易标记为已完成 该方法应该在交易完成,签名验证后,且更新交易双方账户后使用
func GetUpdatedBalance ¶
func GetUpdatedBalance(tx *transaction.Transaction, balanceSender, balanceReceipt *rlwe.Ciphertext) (updatedSender *rlwe.Ciphertext, updatedReceipt *rlwe.Ciphertext, err error)
func GetUpdatedReceiptBalance ¶
func GetUpdatedReceiptBalance(tx *transaction.Transaction, balance *rlwe.Ciphertext) (updated *rlwe.Ciphertext, err error)
GetUpdatedReceiptBalance 计算新的接收方余额,也就是包装过的密文加法 输入原余额和变动金额,输出新的余额
func GetUpdatedSenderBalance ¶
func GetUpdatedSenderBalance(tx *transaction.Transaction, balance *rlwe.Ciphertext) (updated *rlwe.Ciphertext, err error)
GetUpdatedSenderBalance 计算新的发送方余额,也就是包装过的密文减法 输入原余额和变动金额,输出新的余额
func InitializeNewReceiptPKTransaction ¶
func InitializeNewReceiptPKTransaction(t *transaction.Transaction) (err error)
func InitializeNewSenderPKTransaction ¶
func InitializeNewSenderPKTransaction(t *transaction.Transaction) (err error)
func KeySwitchReceiptToSender ¶
func KeySwitchReceiptToSender(t *transaction.Transaction, swk *rlwe.SwitchingKey) (err error)
func KeySwitchSenderToReceipt ¶
func KeySwitchSenderToReceipt(t *transaction.Transaction, swk *rlwe.SwitchingKey) (err error)
func NewEmptyEvaluator ¶
func ReEncryptCTWithSwk ¶
func ReEncryptCTWithSwk(ctIn *rlwe.Ciphertext, swk *rlwe.SwitchingKey) (ctOut *rlwe.Ciphertext, err error)
func RequestSwitchingKey ¶
RequestSwitchingKey 向 CA 请求重加密密钥
func ValidateSignatureBase ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.