···66// define a capability
77Capabilities are the atomic unit of security in Twizzler, acting as tokens of
88//NOTE: point forward towards security contexts?
99-protections granted to a process, allowing it to access some object in the ways
1010-it describes. Colloquially a capability is defined as permissions and
1111-a unique object to which those permissions apply, but in Twizzler we add
1212-the signature component to allow the kernel to validate that the security policy was created by an authorized party.
99+protections that allow a process to access an object in the ways it describes. More
1010+information about how capabilities interact with processes can be found in section 4.2.
1111+Colloquially a capability is defined as permissions and a unique object to which
1212+those permissions apply, but in Twizzler we add the signature component to allow
1313+the kernel to validate that the security policy was created by an authorized
1414+party.
13151416Thus, a Capability is represented as follows:
1517···2022 accessor: ObjID, // Security context ID in which this capability resides.
2123 prots: Protections, // Specific access rights this capability grants.
2224 flags: CapFlags, // Cryptographic configuration for capability validation.
2323- gates: Gates, // Additional constraints on when this capability can be used.
2525+ gates: Gates, // Constraints on where permisions are applied.
2426 revocation: Revoc, // Specifies when this capability is invalid, i.e. expiration.
2527 sig: Signature, // The signature.
2628}
···3032== Signature
3133The signature is what determines the validity of the capability. The
3234only possible signer of some capability is who ever has permissions to read the
3333-signing key object, or the kernel itself. The signature is built up of a array with
3434-a maximum length and a enum representing what type of cryptographic scheme
3535-was used to create it; quite similar to the keys mentioned previously.
3535+signing key object, or the kernel itself. The signature is built up of an array with
3636+a maximum length and an enum representing what type of cryptographic scheme
3737+was used to create it; quite similar to the keys mentioned in section 2.
3638The fields of the capability are serialized and hashed to form the message that gets signed,
3739and then stored in the signature field. Currently we support Blake3 and
3840Sha256 as hashing algorithms.
···5153// something to think about
52545355== Flags
5454-Currently, flags in capabilities are used to specify which hashing algorithm to use to form a message to be signed. We allow for multiple algorithms to be used to
5555-allow for backward capability when newer, more efficient hashing algorithms are created.
5656+Currently, flags in capabilities are used to specify which hashing algorithm was
5757+used
5858+to form the message that was signed. We allow multiple algorithms to be used
5959+to allow for backward capability when newer, more efficient hashing algorithms
6060+are created.
56615757-The flags inside a capability is a bitmask providing information about distinct feautures
5858-of that capability. Currently we only use them to mark what hashing algorithm was used to
5959-form the message for the signature, but there's plenty of bits left to use.
6060-We hope for future work to develop more expressive ways of using capabilities, i.e. Decentralized Information Flow Control, as specified in
6161-6.1.
6262-6262+The flags inside a capability is a bitmask providing information about distinct
6363+feautures of that capability. Currently they only convey the hashing algoritmn
6464+but there's plenty of bits left to use. We hope for future work to develop more
6565+expressive ways of using capabilities through the flags.
6366// maybe worth discussing delegations if only to describe how they could be
6467// extended from capabilities (as a future work ofc)
6568//