Documentation ¶
Index ¶
- Constants
- func ExtractRootHash(gossipSTH Gossip_object) ([]byte, error)
- func TypeString(t string) string
- func Verify_CON(g Gossip_object, c *crypto.CryptoConfig) error
- func Verify_PayloadFrag(g Gossip_object, c *crypto.CryptoConfig) error
- func Verify_PayloadThreshold(g Gossip_object, c *crypto.CryptoConfig) error
- func Verify_RSAPayload(g Gossip_object, c *crypto.CryptoConfig) error
- type Gossip_ID
- type Gossip_Storage
- type Gossip_object
- type Revocation
- type STH
Constants ¶
View Source
const ( STH_INIT = "http://ctng.uconn.edu/101" REV_INIT = "http://ctng.uconn.edu/102" ACC_INIT = "http://ctng.uconn.edu/103" CON_INIT = "http://ctng.uconn.edu/104" STH_FRAG = "http://ctng.uconn.edu/201" REV_FRAG = "http://ctng.uconn.edu/202" ACC_FRAG = "http://ctng.uconn.edu/203" STH_FULL = "http://ctng.uconn.edu/301" REV_FULL = "http://ctng.uconn.edu/302" ACC_FULL = "http://ctng.uconn.edu/303" )
Identifiers for different types of gossip object or PoM counter that can be sent.
View Source
const ( No_Sig_Match = "Signatures don't match" Mislabel = "Fields mislabeled" Invalid_Type = "Invalid Type" )
Types of errors that can occur when parsing a Gossip_object
View Source
const CTNG_APPLICATION = "CTng"
The only valid application type
Variables ¶
This section is empty.
Functions ¶
func ExtractRootHash ¶
func ExtractRootHash(gossipSTH Gossip_object) ([]byte, error)
func TypeString ¶
This function prints the "name string" of each Gossip object type. It's used when printing this info to console.
func Verify_CON ¶
func Verify_CON(g Gossip_object, c *crypto.CryptoConfig) error
func Verify_PayloadFrag ¶
func Verify_PayloadFrag(g Gossip_object, c *crypto.CryptoConfig) error
verifies signature fragments match with payload
func Verify_PayloadThreshold ¶
func Verify_PayloadThreshold(g Gossip_object, c *crypto.CryptoConfig) error
verifies threshold signatures match payload
func Verify_RSAPayload ¶
func Verify_RSAPayload(g Gossip_object, c *crypto.CryptoConfig) error
Verifies RSAsig matches payload, wait.... i think this just works out of the box with what we have
Types ¶
type Gossip_ID ¶
type Gossip_Storage ¶
type Gossip_Storage map[Gossip_ID]Gossip_object
type Gossip_object ¶
type Gossip_object struct { Application string `json:"application"` Period string `json:"period"` Type string `json:"type"` Signer string `json:"signer"` Signers []string `json:"signers,omitempty"` Signature [2]string `json:"signature"` // Timestamp is a UTC RFC3339 string Timestamp string `json:"timestamp"` Crypto_Scheme string `json:"crypto_scheme"` Payload [3]string `json:"payload,omitempty"` }
func (Gossip_object) GetID ¶
func (g Gossip_object) GetID() Gossip_ID
func (Gossip_object) GetTargetType ¶
func (g Gossip_object) GetTargetType() string
func (Gossip_object) Verify ¶
func (g Gossip_object) Verify(c *crypto.CryptoConfig) error
Verifies Gossip object based on the type: STH and Revocations use RSA Trusted information Fragments use BLS SigFragments PoMs use Threshold signatures
type Revocation ¶
Click to show internal directories.
Click to hide internal directories.