srp6apple

package
v0.0.0-...-3bed8bd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

README

srp6apple

This is a fork of https://github.com/mwpcheung/gsalogin with everything except the implementation of Apple's SRP-6a algorithm removed.

The original implementation is MIT license, Copyright (c) 2022 mwpcheung

Documentation

Index

Constants

View Source
const (
	ProtocolS2KFO = "s2k_fo"
	ProtocolS2K   = "s2k"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SRPClient

type SRPClient struct {
	Params     *SRPParams
	Secret1    *big.Int
	Multiplier *big.Int
	A          *big.Int
	X          *big.Int
	M1         []byte
	M2         []byte
	K          []byte
	// contains filtered or unexported fields
}

func New

func New() *SRPClient

func (*SRPClient) ABytes

func (c *SRPClient) ABytes() []byte

func (*SRPClient) Compute

func (c *SRPClient) Compute(username, password, protocol string, iterationCount int, salt, b []byte)

type SRPParams

type SRPParams struct {
	G    *big.Int
	N    *big.Int
	Hash crypto.Hash
	Bits int

	NoUserNameInX bool
}

func (*SRPParams) Digest

func (params *SRPParams) Digest(message []byte) []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL