# README
gonss3
Package documentation: https://godoc.org/github.com/rusq/gonss3
Package gonss implements the subset of Mozilla NSS3 library. It implements just enough to decrypt the firefox profile passwords.
I take no credit, implementation is entirely based on this project which is based on Dr Stephen Henson research for "Netscape Key Databases".
Supports only key4.db
(sqlite).
This library is created for educational purposes and licenced under LGPL 3.0.
Usage
package main
import "github.com/rusq/gonss3"
func main() {
profile, err := gonss3.New("/path/to/profile", []byte("masterpass"))
// handle err
userCt, passCt := // fetch some data from logins.json
user,err := profile.DecryptField(userCt)
// handle err
pass,err := profile.DecryptField(passCt)
// handle err
fmt.Println(user, pass)
}
TODO
[ ] TESTS
Useful links
# Functions
New opens a firefox profile.
# Structs
EncParams are encryption field encryption parameters.
EncryptedField represents an encrypted field (for ASN1 unmarshal).
MasterKey describes the following ASN1 structure:
SEQUENCE { SEQUENCE { OBJECTIDENTIFIER 1.2.840.113549.1.12.5.1.3 SEQUENCE { OCTETSTRING entry_salt INTEGER 01 } } OCTETSTRING encrypted_master_key }.
Profile is the Firefox profile.
Salt is cryptographic salt, part of MasterKey.
SaltValue is the salt value, part of MasterKey.