Documentation ¶
Index ¶
- Constants
- type DRKeyExtn
- func (s *DRKeyExtn) Copy() common.Extension
- func (s *DRKeyExtn) Len() int
- func (s *DRKeyExtn) Pack() (common.RawBytes, error)
- func (s DRKeyExtn) SetDirection(dir Dir) error
- func (s DRKeyExtn) SetMAC(mac common.RawBytes) error
- func (s *DRKeyExtn) String() string
- func (s *DRKeyExtn) Write(b common.RawBytes) error
- type Dir
- type HashTreeExtn
- func (s *HashTreeExtn) Copy() common.Extension
- func (s *HashTreeExtn) Len() int
- func (s *HashTreeExtn) Pack() (common.RawBytes, error)
- func (s HashTreeExtn) SetHashes(hashes common.RawBytes) error
- func (s HashTreeExtn) SetOrder(order common.RawBytes) error
- func (s HashTreeExtn) SetSignature(signature common.RawBytes) error
- func (s *HashTreeExtn) String() string
- func (s *HashTreeExtn) Write(b common.RawBytes) error
Constants ¶
View Source
const ( DirectionLength = 1 PaddingLength = 3 MACLength = 16 DirectionOffset = spse.SecModeLength MACOffset = DirectionOffset + DirectionLength + PaddingLength DRKeyTotalLength = MACOffset + MACLength )
View Source
const ( MaxHeight = 16 HeightLength = 1 ReservedLength = 1 OrderLength = 2 SignatureLength = 64 HashLength = 16 HeightOffset = spse.SecModeLength OrderOffset = HeightOffset + ReservedLength + HeightLength SignatureOffset = OrderOffset + OrderLength HashesOffset = SignatureOffset + SignatureLength )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DRKeyExtn ¶
type DRKeyExtn struct { *spse.BaseExtn // Direction indicates which key has been used during authentication. Direction Dir // MAC is the mac of the SCION Packet with CurrHF and CurrINF set to zero. MAC common.RawBytes }
DRKeyExtn is an implementation of the SCMPAuthDRKey extension. It is used to authenticate scmp messages.
func NewDRKeyExtn ¶
func NewDRKeyExtn() *DRKeyExtn
func (DRKeyExtn) SetDirection ¶
type HashTreeExtn ¶
type HashTreeExtn struct { *spse.BaseExtn // Height is the height of the hash tree. Max height is 16. Height uint8 // Order is a bit vector. The bit at index i is associated with hash i. // 0 (1) indicates hash i shall be used as left (right) input. Order common.RawBytes // Signature is the signature of the root hash. Signature common.RawBytes // Hashes are the hashes to verify the proof. // At index 0 is the leaf hash. At index height is the root hash. Hashes common.RawBytes }
HashTreeExtn is the implementation of the SCMPAuthHashTree extension. It is used to authenticate scmp messages.
func NewHashTreeExtn ¶
func NewHashTreeExtn(height uint8) (*HashTreeExtn, error)
func (*HashTreeExtn) Copy ¶
func (s *HashTreeExtn) Copy() common.Extension
func (*HashTreeExtn) Len ¶
func (s *HashTreeExtn) Len() int
func (HashTreeExtn) SetSignature ¶
func (s HashTreeExtn) SetSignature(signature common.RawBytes) error
func (*HashTreeExtn) String ¶
func (s *HashTreeExtn) String() string
Click to show internal directories.
Click to hide internal directories.