tpmdd-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* tpm: Provide a TPM access library
@ 2018-08-21 15:56 David Howells
       [not found] ` <153486700916.13066.12870860668352070081.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
       [not found] ` <20180822141956.GA28110-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
  0 siblings, 2 replies; 42+ messages in thread
From: David Howells @ 2018-08-21 15:56 UTC (permalink / raw)
  To: denkenz-Re5JQEeQqe8AvxtiuMwx3w,
	jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA,
	jejb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-integrity-u79uwXL29TY76Z2rM5mHXA,
	keyrings-u79uwXL29TY76Z2rM5mHXA,
	linux-security-module-u79uwXL29TY76Z2rM5mHXA


Hi Denis, Jarkko, James,

I managed to recover the TPM library patchset that I was working on about four
years ago in the process of trying to write an asymmetric key subtype that
could use the TPM.

Here it is in it's original glory for reference.  I ended up leaving it
because Jarkko's tpm-2 stuff broke it and I had other things to work on.  If
it's deemed worthwhile, I can try to forward port it to current Linus/mastet.

Note that one or two of the preliminary patches may be upstream.

The patches can also be found here:

	http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=tpm-lib

Thanks,
David
---
David Howells (23):
      TPM: Add new TPMs to the tail of the list to prevent inadvertent change of dev
      TPM: Provide a facility for a userspace TPM emulator
      TPM: Provide a platform driver for the user emulator driver
      TPM: Expose struct tpm_chip and related find_get and put functions
      TPM: Use struct tpm_chip rather than chip number as interface parameter
      TPM: Move ordinal values from interface file to header with other ordinals
      TPM: Consolidate tpm_send(), transmit_cmd() and tpm_transmit()
      TPMLIB: Break TPM bits out of security/keys/trusted.c
      TPMLIB: Do some source cleanups
      TPMLIB: Better format calls to TSS_*hmac*()
      TPMLIB: Put banner comments on public TPM library functions
      TPMLIB: Create tpm_{even,odd}_nonce structs to represent nonces
      TPMLIB: Rename store8() and storebytes()
      TPMLIB: Make store_s() take a void* data argument, not unsigned char*
      TPMLIB: Use __be32 rather than int32_t and use cpu_to_beX() and co.
      TPMLIB: Put more comments into the HMAC generation functions
      TPMLIB: Provide a wrapper to load bytes out of the reply
      TPMLIB: Encapsulate XOR-based encryption with authkey derivative
      TPMLIB: Add some debugging code
      TPMLIB: Implement call to TPM_CreateWrapKey
      TPMLIB: Implement call to TPM_LoadKey2
      TPMLIB: Provide call for TPM_FlushSpecific
      TPM: Add an asymmetric key subtype for handling TPM-based keys


 crypto/asymmetric_keys/Kconfig          |    7 
 crypto/asymmetric_keys/Makefile         |    1 
 crypto/asymmetric_keys/tpm_key.c        |   73 ++
 crypto/asymmetric_keys/tpm_key.h        |   19 
 crypto/asymmetric_keys/tpm_key_parser.c |  212 +++++
 drivers/char/tpm/Kconfig                |   13 
 drivers/char/tpm/Makefile               |    3 
 drivers/char/tpm/tpm-dev.c              |   17 
 drivers/char/tpm/tpm-interface.c        |  304 ++++----
 drivers/char/tpm/tpm-library.c          | 1216 +++++++++++++++++++++++++++++++
 drivers/char/tpm/tpm-library.h          |  119 +++
 drivers/char/tpm/tpm-sysfs.c            |   33 -
 drivers/char/tpm/tpm.h                  |   15 
 drivers/char/tpm/tpm_infineon.c         |    6 
 drivers/char/tpm/tpm_user_emul.c        |  694 ++++++++++++++++++
 include/linux/tpm.h                     |  123 +++
 include/linux/tpm_command.h             |   22 -
 include/linux/wait.h                    |   11 
 security/integrity/ima/ima.h            |    2 
 security/integrity/ima/ima_crypto.c     |    4 
 security/integrity/ima/ima_init.c       |   19 
 security/integrity/ima/ima_queue.c      |    4 
 security/keys/trusted.c                 |  690 +-----------------
 security/keys/trusted.h                 |   80 --
 24 files changed, 2712 insertions(+), 975 deletions(-)
 create mode 100644 crypto/asymmetric_keys/tpm_key.c
 create mode 100644 crypto/asymmetric_keys/tpm_key.h
 create mode 100644 crypto/asymmetric_keys/tpm_key_parser.c
 create mode 100644 drivers/char/tpm/tpm-library.c
 create mode 100644 drivers/char/tpm/tpm-library.h
 create mode 100644 drivers/char/tpm/tpm_user_emul.c


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2018-08-27  8:25 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-21 15:56 tpm: Provide a TPM access library David Howells
     [not found] ` <153486700916.13066.12870860668352070081.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2018-08-21 15:56   ` [PATCH 01/23] TPM: Add new TPMs to the tail of the list to prevent inadvertent change of dev David Howells
     [not found]     ` <153486701644.13066.13372706238885253812.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2018-08-21 18:30       ` Jason Gunthorpe
     [not found]         ` <20180821183004.GB25543-uk2M96/98Pc@public.gmane.org>
2018-08-24  6:24           ` Jarkko Sakkinen
     [not found]             ` <20180824062434.GB3584-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2018-08-24  6:25               ` Jarkko Sakkinen
     [not found]                 ` <20180824062557.GC3584-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2018-08-24 11:22                   ` Mimi Zohar
2018-08-24  6:19       ` Jarkko Sakkinen
2018-08-21 15:57   ` [PATCH 02/23] TPM: Provide a facility for a userspace TPM emulator David Howells
     [not found]     ` <153486702302.13066.15889029286852815542.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2018-08-21 18:31       ` Jason Gunthorpe
     [not found]         ` <20180821183140.GD25543-uk2M96/98Pc@public.gmane.org>
2018-08-24  6:29           ` Jarkko Sakkinen
2018-08-21 15:57   ` [PATCH 03/23] TPM: Provide a platform driver for the user emulator driver David Howells
     [not found]     ` <153486702979.13066.16900998092976336647.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2018-08-24  6:30       ` Jarkko Sakkinen
2018-08-21 15:57   ` [PATCH 04/23] TPM: Expose struct tpm_chip and related find_get and put functions David Howells
     [not found]     ` <153486703636.13066.16209594327379341518.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2018-08-21 18:31       ` Jason Gunthorpe
     [not found]     ` <20180821183108.GC25543-uk2M96/98Pc@public.gmane.org>
2018-08-21 18:35       ` David Howells
2018-08-21 15:57   ` [PATCH 05/23] TPM: Use struct tpm_chip rather than chip number as interface parameter David Howells
     [not found]     ` <153486704294.13066.8818198038331415342.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2018-08-24  7:42       ` Jarkko Sakkinen
2018-08-21 15:57   ` [PATCH 06/23] TPM: Move ordinal values from interface file to header with other ordinals David Howells
2018-08-21 15:57   ` [PATCH 07/23] TPM: Consolidate tpm_send(), transmit_cmd() and tpm_transmit() David Howells
2018-08-21 15:57   ` [PATCH 08/23] TPMLIB: Break TPM bits out of security/keys/trusted.c David Howells
     [not found]     ` <153486706322.13066.3105842100625841410.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2018-08-24  7:52       ` Jarkko Sakkinen
     [not found]         ` <20180824075227.GG3584-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2018-08-24  8:49           ` Jarkko Sakkinen
     [not found]         ` <20180824084930.GA10266-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2018-08-24  9:33           ` David Howells
     [not found]             ` <25340.1535103190-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2018-08-27  8:25               ` Jarkko Sakkinen
2018-08-21 15:57   ` [PATCH 09/23] TPMLIB: Do some source cleanups David Howells
2018-08-21 15:57   ` [PATCH 10/23] TPMLIB: Better format calls to TSS_*hmac*() David Howells
2018-08-21 15:58   ` [PATCH 11/23] TPMLIB: Put banner comments on public TPM library functions David Howells
2018-08-21 15:58   ` [PATCH 12/23] TPMLIB: Create tpm_{even, odd}_nonce structs to represent nonces David Howells
2018-08-21 15:58   ` [PATCH 13/23] TPMLIB: Rename store8() and storebytes() David Howells
2018-08-21 15:58   ` [PATCH 14/23] TPMLIB: Make store_s() take a void* data argument, not unsigned char* David Howells
2018-08-21 15:58   ` [PATCH 15/23] TPMLIB: Use __be32 rather than int32_t and use cpu_to_beX() and co David Howells
2018-08-21 15:58   ` [PATCH 16/23] TPMLIB: Put more comments into the HMAC generation functions David Howells
2018-08-21 15:58   ` [PATCH 17/23] TPMLIB: Provide a wrapper to load bytes out of the reply David Howells
2018-08-21 15:58   ` [PATCH 18/23] TPMLIB: Encapsulate XOR-based encryption with authkey derivative David Howells
2018-08-21 15:58   ` [PATCH 19/23] TPMLIB: Add some debugging code David Howells
2018-08-21 15:59   ` [PATCH 20/23] TPMLIB: Implement call to TPM_CreateWrapKey David Howells
2018-08-21 15:59   ` [PATCH 21/23] TPMLIB: Implement call to TPM_LoadKey2 David Howells
2018-08-21 15:59   ` [PATCH 22/23] TPMLIB: Provide call for TPM_FlushSpecific David Howells
2018-08-21 15:59   ` [PATCH 23/23] TPM: Add an asymmetric key subtype for handling TPM-based keys David Howells
2018-08-22 14:19   ` tpm: Provide a TPM access library Jarkko Sakkinen
     [not found] ` <20180822141956.GA28110-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2018-08-22 14:45   ` David Howells
     [not found]     ` <13611.1534949106-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2018-08-23 22:49       ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).