Class: Google::Cloud::Kms::V1::CryptoKeyVersion

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/kms/v1/resources.rb

Overview

A CryptoKeyVersion represents an individual cryptographic key, and the associated key material.

An ENABLED version can be used for cryptographic operations.

For security reasons, the raw cryptographic key material represented by a CryptoKeyVersion can never be viewed or exported. It can only be used to encrypt, decrypt, or sign data when an authorized user or application invokes Cloud KMS.

Defined Under Namespace

Modules: CryptoKeyVersionAlgorithm, CryptoKeyVersionState, CryptoKeyVersionView

Instance Attribute Summary collapse

Instance Attribute Details

#algorithm::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm (readonly)

Returns Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#attestation::Google::Cloud::Kms::V1::KeyOperationAttestation (readonly)

Returns Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.

Returns:



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#create_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. The time at which this CryptoKeyVersion was created.

Returns:



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#destroy_event_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if state is DESTROYED.

Returns:



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#destroy_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. The time this CryptoKeyVersion's key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.

Returns:



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#external_protection_level_options::Google::Cloud::Kms::V1::ExternalProtectionLevelOptions

Returns ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels.

Returns:



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#generate_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. The time this CryptoKeyVersion's key material was generated.

Returns:



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#import_failure_reason::String (readonly)

Returns Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.

Returns:

  • (::String)

    Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#import_job::String (readonly)

Returns Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.

Returns:

  • (::String)

    Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#import_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. The time at which this CryptoKeyVersion's key material was most recently imported.

Returns:



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#name::String (readonly)

Returns Output only. The resource name for this CryptoKeyVersion in the format projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.

Returns:

  • (::String)

    Output only. The resource name for this CryptoKeyVersion in the format projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#protection_level::Google::Cloud::Kms::V1::ProtectionLevel (readonly)

Returns Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.

Returns:



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#reimport_eligible::Boolean (readonly)

Returns Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.

Returns:



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#state::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState

Returns The current state of the CryptoKeyVersion.



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 354

class CryptoKeyVersion
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The algorithm of the
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  #
  # Algorithms beginning with "HMAC_" are usable with
  # {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::MAC MAC}.
  #
  # The suffix following "HMAC_" corresponds to the hash algorithm being used
  # (eg. SHA256).
  #
  # For more information, see [Key purposes and algorithms]
  # (https://cloud.google.com/kms/docs/algorithms).
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PSS 4096 bit key with a SHA512 digest.
    RSA_SIGN_PSS_4096_SHA512 = 15

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
    RSA_SIGN_PKCS1_4096_SHA512 = 16

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
    RSA_SIGN_RAW_PKCS1_2048 = 28

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
    RSA_SIGN_RAW_PKCS1_3072 = 29

    # RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
    RSA_SIGN_RAW_PKCS1_4096 = 30

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # RSAES-OAEP 4096 bit key with a SHA512 digest.
    RSA_DECRYPT_OAEP_4096_SHA512 = 17

    # RSAES-OAEP 2048 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_2048_SHA1 = 37

    # RSAES-OAEP 3072 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_3072_SHA1 = 38

    # RSAES-OAEP 4096 bit key with a SHA1 digest.
    RSA_DECRYPT_OAEP_4096_SHA1 = 39

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13

    # ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
    # HSM protection level.
    EC_SIGN_SECP256K1_SHA256 = 31

    # HMAC-SHA256 signing with a 256 bit key.
    HMAC_SHA256 = 32

    # Algorithm representing symmetric encryption by an external key manager.
    EXTERNAL_SYMMETRIC_ENCRYPTION = 18
  end

  # The state of a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # This version may only become
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # again if this version is
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#reimport_eligible reimport_eligible}
    # and the original key material is reimported with a call to
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#import_crypto_key_version KeyManagementService.ImportCryptoKeyVersion}.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion}
    # to put it back into the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4

    # This version is still being imported. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_IMPORT = 6

    # This version was not imported successfully. It may not be used, enabled,
    # disabled, or destroyed. The submitted key material has been discarded.
    # Additional details can be found in
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#import_failure_reason CryptoKeyVersion.import_failure_reason}.
    IMPORT_FAILED = 7
  end

  # A view for {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_key_versions KeyManagementService.ListCryptoKeyVersions}
  # and
  # {::Google::Cloud::Kms::V1::KeyManagementService::Client#list_crypto_keys KeyManagementService.ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {::Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end