fmgp.did.comm

package fmgp.did.comm

Members list

Type members

Classlikes

object APU

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
APU.type
object APV

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
APV.type
case class AnonHeaderBuilder(apv: APV, enc: ENCAlgorithm, alg: KWAlgorithm) extends ProtectedHeaderTMP

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class AnonProtectedHeader(epk: PublicKey, apv: APV, typ: Option[MediaTypes], enc: ENCAlgorithm, alg: KWAlgorithm) extends ProtectedHeader

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class Attachment(id: Option[String], description: Option[String], filename: Option[String], media_type: Option[String], format: Option[String], lastmod_time: Option[String], data: AttachmentData, byte_count: Option[String])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Attachment

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Attachment.type
sealed trait AttachmentData

A JSON object that gives access to the actual content of the attachment.

A JSON object that gives access to the actual content of the attachment.

This MUST contain at least one of the following subfields, and enough of them to allow access to the data:

Value parameters

base64

OPTIONAL. Base64url-encoded data, when representing arbitrary content inline instead of via links.

hash

OPTIONAL. The hash of the content encoded in multi-hash format. Used as an integrity check for the attachment, and MUST be used if the data is referenced via the links data attribute.

json

OPTIONAL. Directly embedded JSON data, when representing content inline instead of via links, and when the content is natively conveyable as JSON.

jws

OPTIONAL. A JWS in detached content mode, where the payload field of the JWS maps to base64 or to something fetchable via links. This allows attachments to be signed. The signature need not come from the author of the message.

links

OPTIONAL. A list of zero or more locations at which the content may be fetched. This allows content to be attached by reference instead of by value.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class AttachmentDataAny(jws: Option[JWS_WithOutPayload], hash: Option[String], links: Option[Seq[String]], base64: Option[Base64], json: Option[Json]) extends AttachmentData

This class is not intended to be used. (Is just a fallback to be fully compatible with the specification)

This class is not intended to be used. (Is just a fallback to be fully compatible with the specification)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class AttachmentDataBase64(base64: Base64) extends AttachmentData

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class AttachmentDataJWS(jws: JWS_WithOutPayload, links: Option[Seq[String]]) extends AttachmentData

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class AttachmentDataJson(json: Json) extends AttachmentData

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class AttachmentDataLinks(links: Seq[String], hash: Required[String]) extends AttachmentData

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class AuthProtectedHeader(epk: PublicKey, apv: APV, skid: VerificationMethodReferenced, apu: APU, typ: Option[MediaTypes], enc: ENCAlgorithm, alg: KWAlgorithm) extends ProtectedHeader

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object CipherText

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
CipherText.type

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ENCAlgorithm

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
trait EncryptedMessage extends Message

DIDComm messaging

DIDComm messaging

The encrypted form of a JWM is a JWE in General JSON Format.

DIDComm messaging support only a subset of the supported algorithms of JWAs

Types:

Content Encryption Algorithms: (with a AES 256-bit keys, or with an optional implementation using XC20P algorithm) https://identity.foundation/didcomm-messaging/spec/#curves-and-content-encryption-algorithms

  • X25519
  • P-384
  • P-256 (deprecated in favor of P-384)
  • P-521 (Optional)

JWE protected header enc MUST be one of:

  • A256CBC-HS512
  • A256GCM
  • XC20P (XChaCha20Poly1305 with a 256 bit key)

JWE protected header alg can be one of: https://identity.foundation/didcomm-messaging/spec/#key-wrapping-algorithms

  • ECDH-ES+A256KW (with P-256; P-384; P-521; X25519) for "anoncrypt" messages
  • ECDH-1PU+A256KW (with P-256; P-384; P-521; X25519) for "authcrypt" messages

Attributes

Companion
object
Supertypes
trait Message
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
case class EncryptedMessageGeneric(ciphertext: CipherText, `protected`: Base64Obj[ProtectedHeader], recipients: Seq[Recipient], tag: TAG, iv: IV) extends EncryptedMessage

TODO - To prevent invalid curve and weak point attacks, implementations that decrypt messages from a NIST curve MUST verify that the received public key (contained in the JWE protected header) is on the curve in question. This check may already be done by some JOSE libraries, but developers should not assume this is the case. See this explanation of the risk, and this practical guide for how to perform the verification correctly. https://neilmadden.blog/2017/05/17/so-how-do-you-validate-nist-ecdh-public-keys/

TODO - To prevent invalid curve and weak point attacks, implementations that decrypt messages from a NIST curve MUST verify that the received public key (contained in the JWE protected header) is on the curve in question. This check may already be done by some JOSE libraries, but developers should not assume this is the case. See this explanation of the risk, and this practical guide for how to perform the verification correctly. https://neilmadden.blog/2017/05/17/so-how-do-you-validate-nist-ecdh-public-keys/

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Message
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object FROM

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
FROM.type
object FROMTO

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
FROMTO.type
object IV

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
IV.type
object JSON_RFC7159

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case class JWMHeader(kid: String)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object JWMHeader

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
JWMHeader.type
case class JWMSignatureObj(`protected`: JWM_PROTECTED, signature: JWM_SIGNATURE, header: Option[JWMHeader])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Key Wrapping Algorithms

Key Wrapping Algorithms

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object KWAlgorithm

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
enum MediaTypes(val typ: String)

IANA Media Types

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object MediaTypes

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
MediaTypes.type
sealed trait Message

DID Comm Message

DID Comm Message

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Message

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Message.type
object MsgID

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
MsgID.type
trait Operations

DID Comm operations

DID Comm operations

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Operations

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Operations.type
object OperationsImp

TODO Fix all FIXME

TODO Fix all FIXME

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class OperationsImp(cryptoOperations: CryptoOperations) extends Operations

Attributes

Companion
object
Supertypes
trait Operations
class Object
trait Matchable
class Any
sealed trait OutOfBand

OutOfBand make more type safe for OOB with SignedMessage or PlaintextMessage

OutOfBand make more type safe for OOB with SignedMessage or PlaintextMessage

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object OutOfBand

OOB - OutOfBand

OOB - OutOfBand

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
OutOfBand.type
case class OutOfBandPlaintext extends OutOfBand

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait OutOfBand
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class OutOfBandSigned extends OutOfBand

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait OutOfBand
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object PIURI

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
PIURI.type
object Payload

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Payload.type
trait PlaintextMessage extends Message

https://identity.foundation/didcomm-messaging/spec/#message-headers

Attributes

Companion
object
Supertypes
trait Message
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
case class PlaintextMessageClass(id: Required[MsgID], `type`: PIURI, to: Option[Set[TO]], from: Option[FROM], thid: Option[MsgID], created_time: Option[UTCEpoch], expires_time: Option[UTCEpoch], body: Option[JSON_RFC7159], attachments: Option[Seq[Attachment]], from_prior: Option[JWTToken], return_route: Option[ReturnRoute], accept-lang: Option[Seq[LanguageCodeIANA]], lang: Option[LanguageCodeIANA], l10n: Option[L10n], sender_order: Option[SenderOrder], sent_count: Option[SentCount], received_orders: Option[Seq[ReceivedOrdersElement]], typ: Option[String]) extends PlaintextMessage

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Message
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
enum Profiles(val name: String)

https://identity.foundation/didcomm-messaging/spec/#message-headers

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait ProtectedHeader extends ProtectedHeaderTMP
"epk": {"kty":"OKP","crv":"X25519","x":"JHjsmIRZAaB0zRG_wNXLV2rPggF00hdHbW5rj8g0I24"},
"apv":"NcsuAnrRfPK69A-rkZ0L9XWUG4jMvNC3Zg74BPz53PA",
"typ":"application/didcomm-encrypted+json",
"enc":"XC20P",
"alg":"ECDH-ES+A256KW"

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait ProtectedHeaderTMP

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class Recipient(encrypted_key: Base64, header: RecipientHeader)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Recipient

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Recipient.type

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

https://github.com/decentralized-identity/didcomm-messaging/blob/main/extensions/return_route/main.md

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ReturnRoute

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class SignedMessage(payload: Payload, signatures: Seq[JWMSignatureObj]) extends Message

SignedMessage is a JSON Web Message (JWM)

SignedMessage is a JSON Web Message (JWM)

JWM is a flexible way to encode application-level messages in JSON for transfer over a variety of transport protocols. JWMs use JSON Web Encryption (JWE) to protect integrity, achieve confidentiality, and achieve repudiable authentication; alternatively or in addition, they use JSON Web Signatures (JWS) to associate messages with a non-repudiable digital signature.

https://datatracker.ietf.org/doc/html/draft-looker-jwm-01

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Message
class Object
trait Matchable
class Any
Show all
object SignedMessage

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object TAG

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
TAG.type
object TO

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
TO.type

Types

opaque type APU

APU is a Base64 url encode

APU is a Base64 url encode

Attributes

opaque type APV

APV is a Base64 url encode

APV is a Base64 url encode

Attributes

opaque type CipherText

CipherText is a Base64 url encode

CipherText is a Base64 url encode

Attributes

opaque type FROM

FROM is a DID URL with Path and Query parameter (that can be missing) (no-fragment)

FROM is a DID URL with Path and Query parameter (that can be missing) (no-fragment)

Attributes

Note

the class TO is just a copy of this class and replace FROM with TO

opaque type FROMTO
opaque type IV

InitializationVector is a Base64 url encode

InitializationVector is a Base64 url encode

Attributes

type JSON_RFC7159 = Obj
type JWM_PROTECTED = String
type JWM_SIGNATURE = String
type JWS_WithOutPayload = Json
type JWTToken = Json
opaque type MsgID

The Value is a short (<=32 bytes) string consisting entirely of unreserved URI characters.

The Value is a short (<=32 bytes) string consisting entirely of unreserved URI characters.

unreserved URI characters - https://datatracker.ietf.org/doc/html/rfc3986/#section-2.3:

  • Characters that are allowed in a URI but do not have a reserved purpose are called unreserved. These include uppercase and lowercase letters, decimal digits, hyphen, period, underscore, and tilde:
  • unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"

Attributes

opaque type PIURI
opaque type Payload
opaque type TAG

AuthenticationTag is a Base64 url encode

AuthenticationTag is a Base64 url encode

Attributes

opaque type TO

TO is a DID URL with Path and Query parameter (that can be missing) (no-fragment)

TO is a DID URL with Path and Query parameter (that can be missing) (no-fragment)

Attributes

Note

the class FROM is just a copy of this class and replace TO with FROM

type UTCEpoch = Long

Extensions

Extensions