github.com/hyperledger/aries-framework-go@v0.3.2/pkg/crypto/tinkcrypto/tinkcrypto.go (about) 1 /* 2 Copyright SecureKey Technologies Inc. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 // Package tinkcrypto provides the default implementation of the 8 // common pkg/common/api/crypto.Crypto interface and the SPI pkg/framework/aries.crypto interface 9 // 10 // It uses github.com/tink/go crypto primitives 11 package tinkcrypto 12 13 import ( 14 "github.com/hyperledger/aries-framework-go/component/kmscrypto/crypto/tinkcrypto" 15 ) 16 17 const ( 18 // ECDHESA256KWAlg is the ECDH-ES with AES-GCM 256 key wrapping algorithm. 19 ECDHESA256KWAlg = tinkcrypto.ECDHESA256KWAlg 20 // ECDH1PUA128KWAlg is the ECDH-1PU with AES-CBC 128+HMAC-SHA 256 key wrapping algorithm. 21 ECDH1PUA128KWAlg = tinkcrypto.ECDH1PUA128KWAlg 22 // ECDH1PUA192KWAlg is the ECDH-1PU with AES-CBC 192+HMAC-SHA 384 key wrapping algorithm. 23 ECDH1PUA192KWAlg = tinkcrypto.ECDH1PUA192KWAlg 24 // ECDH1PUA256KWAlg is the ECDH-1PU with AES-CBC 256+HMAC-SHA 512 key wrapping algorithm. 25 ECDH1PUA256KWAlg = tinkcrypto.ECDH1PUA256KWAlg 26 // ECDHESXC20PKWAlg is the ECDH-ES with XChacha20Poly1305 key wrapping algorithm. 27 ECDHESXC20PKWAlg = tinkcrypto.ECDHESXC20PKWAlg 28 // ECDH1PUXC20PKWAlg is the ECDH-1PU with XChacha20Poly1305 key wrapping algorithm. 29 ECDH1PUXC20PKWAlg = tinkcrypto.ECDH1PUXC20PKWAlg 30 ) 31 32 // Package tinkcrypto includes the default implementation of pkg/crypto. It uses Tink for executing crypto primitives 33 // and will be built as a framework option. It represents the main crypto service in the framework. `kh interface{}` 34 // arguments in this implementation represent Tink's `*keyset.Handle`, using this type provides easy integration with 35 // Tink and the default KMS service. 36 37 // Crypto is the default Crypto SPI implementation using Tink. 38 type Crypto = tinkcrypto.Crypto 39 40 // New creates a new Crypto instance. 41 func New() (*Crypto, error) { 42 return tinkcrypto.New() 43 }