com.authlete.cose.constants.COSEKeyOperations Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cbor Show documentation
Show all versions of cbor Show documentation
A Java library for CBOR, COSE, CWT and mdoc.
The newest version!
/*
* Copyright (C) 2023 Authlete, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.authlete.cose.constants;
/**
* COSE Key Operations
*
*
*
*
*
* Name
* Value
* Description
*
*
*
* {@link #SIGN sign}
* 1
* The key is used to create signatures. Requires private key fields.
*
*
*
* {@link #VERIFY verify}
* 2
* The key is used for verification of signatures.
*
*
*
* {@link #ENCRYPT encrypt}
* 3
* The key is used for key transport encryption.
*
*
*
* {@link #DECRYPT decrypt}
* 4
* The key is used for key transport decryption. Requires private key fields.
*
*
*
* {@link #WRAP_KEY wrap key}
* 5
* The key is used for key wrap encryption.
*
*
*
* {@link #UNWRAP_KEY unwrap key}
* 6
* The key is used for key wrap decryption. Requires private key fields.
*
*
*
* {@link #DERIVE_KEY derive key}
* 7
* The key is used for deriving keys. Requires private key fields.
*
*
*
* {@link #DERIVE_BITS derive bits}
* 8
* The key is used for deriving bits not to be used as a key. Requires private key fields.
*
*
*
* {@link #MAC_CREATE MAC create}
* 9
* The key is used for creating MACs.
*
*
*
* {@link #MAC_VERIFY MAC verify}
* 10
* The key is used for validating MACs.
*
*
*
*
*
* @since 1.1
*
* @see RFC 9052, Table 5: Key Operation Values
*/
public final class COSEKeyOperations
{
/** sign (1) */
public static final int SIGN = 1;
/** verify (2) */
public static final int VERIFY = 2;
/** encrypt (3) */
public static final int ENCRYPT = 3;
/** decrypt (4) */
public static final int DECRYPT = 4;
/** wrap key (5) */
public static final int WRAP_KEY = 5;
/** unwrap key (6) */
public static final int UNWRAP_KEY = 6;
/** derive key (7) */
public static final int DERIVE_KEY = 7;
/** derive bits (8) */
public static final int DERIVE_BITS = 8;
/** MAC create (9) */
public static final int MAC_CREATE = 9;
/** MAC verify (10) */
public static final int MAC_VERIFY = 10;
private COSEKeyOperations()
{
}
}