feat: initial commit

This commit is contained in:
l.weber 2025-12-05 12:20:05 +01:00
commit a161b86c9a
705 changed files with 288162 additions and 0 deletions

View file

@ -0,0 +1,94 @@
// Package secv1 contains terms for the W3ID Security namespace.
package secv1
import (
_ "embed"
)
//go:embed context.jsonld
var ContextDocument []byte
// IRI is the remote context IRI.
const IRI = "https://w3id.org/security/v1"
// Namespace is the IRI prefix used for terms defined in this namespace.
const Namespace = "https://w3id.org/security#"
const (
// AuthenticationTag is a string.
AuthenticationTag = Namespace + "authenticationTag"
// CanonicalizationAlgorithm is a string.
CanonicalizationAlgorithm = Namespace + "canonicalizationAlgorithm"
// CipherAlgorithm is a string.
CipherAlgorithm = Namespace + "cipherAlgorithm"
// CipherData is a string.
CipherData = Namespace + "cipherData"
// CipherKey is a string.
CipherKey = Namespace + "cipherKey"
// DigestAlgorithm is a string.
DigestAlgorithm = Namespace + "digestAlgorithm"
// DigestValue is a string.
DigestValue = Namespace + "digestValue"
// Domain is a string.
Domain = Namespace + "domain"
// EncryptionKey is a string.
EncryptionKey = Namespace + "encryptionKey"
// Expiration is an xml:dateTime, equivalent to a time.Date in RFC3339Nano.
Expiration = Namespace + "expiration"
// Expires is an xml:dateTime, equivalent to a time.Date in RFC3339Nano.
Expires = Namespace + "expiration"
// InitializationVector is a string.
InitializationVector = Namespace + "initializationVector"
// IterationCount is a string.
IterationCount = Namespace + "iterationCount"
// Nonce is a string.
Nonce = Namespace + "nonce"
// NormalizationAlgorithm is a string.
NormalizationAlgorithm = Namespace + "normalizationAlgorithm"
// Owner is an IRI, either as a string or as an object with an
// id property.
Owner = Namespace + "owner"
// Password is a string.
Password = Namespace + "password"
// PrivateKey is an IRI, either as a string or as an object with an
// id property.
PrivateKey = Namespace + "privateKey"
// PrivateKeyPem is a string.
PrivateKeyPem = Namespace + "privateKeyPem"
// PublicKey is an IRI, either as a string or as an object with an
// id property.
PublicKey = Namespace + "publicKey"
// PublicKeyBase58 is a string.
PublicKeyBase58 = Namespace + "publicKeyBase58"
// PublicKeyPem is a string.
PublicKeyPem = Namespace + "publicKeyPem"
// PublicKeyService is an IRI, either as a string or as an object with an
// id property.
PublicKeyService = Namespace + "publicKeyService"
// PublicKeyWif is a string.
PublicKeyWif = Namespace + "publicKeyWif"
// Revoked is an xml:dateTime, equivalent to a time.Date in RFC3339Nano.
Revoked = Namespace + "revoked"
// Salt is a string.
Salt = Namespace + "salt"
// Signature is a string.
Signature = Namespace + "signature"
// SignatureAlgorithm is a string.
SignatureAlgorithm = Namespace + "signingAlgorithm"
// SignatureValue is a string.
SignatureValue = Namespace + "signatureValue"
// TypeCryptographicKey is a possible value for the type property.
TypeCryptographicKey = Namespace + "Key"
// TypeEcdsaKoblitzSignature2016 is a possible value for the type property.
TypeEcdsaKoblitzSignature2016 = Namespace + "EcdsaKoblitzSignature2016"
// TypeEd25519Signature2018 is a possible value for the type property.
TypeEd25519Signature2018 = Namespace + "Ed25519Signature2018"
// TypeEncryptedMessage is a possible value for the type property.
TypeEncryptedMessage = Namespace + "EncryptedMessage"
// TypeGraphSignature2012 is a possible value for the type property.
TypeGraphSignature2012 = Namespace + "GraphSignature2012"
// TypeLinkedDataSignature2015 is a possible value for the type property.
TypeLinkedDataSignature2015 = Namespace + "LinkedDataSignature2015"
// TypeLinkedDataSignature2016 is a possible value for the type property.
TypeLinkedDataSignature2016 = Namespace + "LinkedDataSignature2016"
)

View file

@ -0,0 +1,74 @@
{
"@context": {
"id": "@id",
"type": "@type",
"dc": "http://purl.org/dc/terms/",
"sec": "https://w3id.org/security#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"EcdsaKoblitzSignature2016": "sec:EcdsaKoblitzSignature2016",
"Ed25519Signature2018": "sec:Ed25519Signature2018",
"EncryptedMessage": "sec:EncryptedMessage",
"GraphSignature2012": "sec:GraphSignature2012",
"LinkedDataSignature2015": "sec:LinkedDataSignature2015",
"LinkedDataSignature2016": "sec:LinkedDataSignature2016",
"CryptographicKey": "sec:Key",
"authenticationTag": "sec:authenticationTag",
"canonicalizationAlgorithm": "sec:canonicalizationAlgorithm",
"cipherAlgorithm": "sec:cipherAlgorithm",
"cipherData": "sec:cipherData",
"cipherKey": "sec:cipherKey",
"created": {
"@id": "dc:created",
"@type": "xsd:dateTime"
},
"creator": {
"@id": "dc:creator",
"@type": "@id"
},
"digestAlgorithm": "sec:digestAlgorithm",
"digestValue": "sec:digestValue",
"domain": "sec:domain",
"encryptionKey": "sec:encryptionKey",
"expiration": {
"@id": "sec:expiration",
"@type": "xsd:dateTime"
},
"expires": {
"@id": "sec:expiration",
"@type": "xsd:dateTime"
},
"initializationVector": "sec:initializationVector",
"iterationCount": "sec:iterationCount",
"nonce": "sec:nonce",
"normalizationAlgorithm": "sec:normalizationAlgorithm",
"owner": {
"@id": "sec:owner",
"@type": "@id"
},
"password": "sec:password",
"privateKey": {
"@id": "sec:privateKey",
"@type": "@id"
},
"privateKeyPem": "sec:privateKeyPem",
"publicKey": {
"@id": "sec:publicKey",
"@type": "@id"
},
"publicKeyBase58": "sec:publicKeyBase58",
"publicKeyPem": "sec:publicKeyPem",
"publicKeyWif": "sec:publicKeyWif",
"publicKeyService": {
"@id": "sec:publicKeyService",
"@type": "@id"
},
"revoked": {
"@id": "sec:revoked",
"@type": "xsd:dateTime"
},
"salt": "sec:salt",
"signature": "sec:signature",
"signatureAlgorithm": "sec:signingAlgorithm",
"signatureValue": "sec:signatureValue"
}
}