Skip to content

Instantly share code, notes, and snippets.

@ignatk
ignatk / derived.py
Last active June 1, 2024 00:59
TPM derived keys
#!/usr/bin/python3
# requires gokey, keyutils, openssl, tpm2-tools
# configure with
# echo 'create * tpm2:derived:* * |<path to this script> %t %d %c %u %g' > /etc/request-key.d/derived.conf
import hashlib
import os
import subprocess
import sys
@ignatk
ignatk / convertiit.c
Last active August 29, 2015 14:01
Utility to convert IIT keys to proper format
/* Copyright (c) 2014, Ignat Korchagin <ignat.korchagin@gmail.com>, Ilya Petrov <ilya.muromec@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
diff --git a/Configure b/Configure
index f0fadaa..c6aed3c 100755
--- a/Configure
+++ b/Configure
@@ -1034,6 +1034,10 @@
$disabled{"ecdsa"} = "forced";
$disabled{"ecdh"} = "forced";
}
+if (defined($disabled{"ec2m"}))
+ {
@ignatk
ignatk / filecrypt.c
Created December 19, 2013 17:27
File encryption utility
/*
============================================================================
Name : filecrypt.c
Author : Ignat
Version :
Copyright : Public domain
Description : File cryptor in C, Ansi-style
============================================================================
*/