~]$ clevis encrypt tang '{"url":"http://tang.srv"}' < PLAINTEXT > JWE
The advertisement contains the following signing keys:
_OsIk0T-E2l6qjfdDiwVmidoZjA
Do you wish to trust these keys? [ynYN] y
Copy to ClipboardCopied!Toggle word wrapToggle overflow
위 예제의 http://tang.srv URL을 tang 이 설치된 서버의 URL과 일치하도록 변경합니다. JWE 출력 파일에는 암호화된 암호화 텍스트가 포함되어 있습니다. 이 암호화 텍스트는 PLAINTEXT 입력 파일에서 읽습니다.
데이터의 암호를 해독하려면 clevis decrypt 명령을 사용하여 JWE(암호화 텍스트)를 제공합니다.
clevis decrypt < JWE > PLAINTEXT
~]$ clevis decrypt < JWE > PLAINTEXT
Copy to ClipboardCopied!Toggle word wrapToggle overflow
자세한 내용은 clevis-encrypt-tang(1) 매뉴얼 페이지를 참조하거나 기본 제공 CLI 도움말을 사용합니다.
clevis
clevis decrypt
clevis encrypt tang
~]$ clevis
Usage: clevis COMMAND [OPTIONS]
clevis decrypt Decrypts using the policy defined at encryption time
clevis encrypt http Encrypts using a REST HTTP escrow server policy
clevis encrypt sss Encrypts using a Shamir's Secret Sharing policy
clevis encrypt tang Encrypts using a Tang binding server policy
clevis encrypt tang Encrypts using a Tang binding server policy
clevis luks bind Binds a LUKSv1 device using the specified policy
clevis luks unlock Unlocks a LUKSv1 volume
~]$ clevis decrypt
Usage: clevis decrypt < JWE > PLAINTEXT
Decrypts using the policy defined at encryption time
~]$ clevis encrypt tang
Usage: clevis encrypt tang CONFIG < PLAINTEXT > JWE
Encrypts using a Tang binding server policy
This command uses the following configuration properties:
url: <string> The base URL of the Tang server (REQUIRED)
thp: <string> The thumbprint of a trusted signing key
adv: <string> A filename containing a trusted advertisement
adv: <object> A trusted advertisement (raw JSON)
Obtaining the thumbprint of a trusted signing key is easy. If you
have access to the Tang server's database directory, simply do:
$ jose jwk thp -i $DBDIR/$SIG.jwk
Alternatively, if you have certainty that your network connection
is not compromised (not likely), you can download the advertisement
yourself using:
$ curl -f $URL/adv > adv.jws
Copy to ClipboardCopied!Toggle word wrapToggle overflow