Discussion of the implementations of VIRTIO specification
 help / color / mirror / Atom feed
From: Huang Yang <yang.huang@intel.com>
To: virtio-dev@lists.oasis-open.org
Cc: mst@redhat.com, cohuck@redhat.com, bing.zhu@intel.com,
	tomas.winkler@intel.com, peter.fang@intel.com,
	Huang Yang <yang.huang@intel.com>
Subject: [virtio-dev] [PATCH v4 0/1] Add virtio rpmb device specification
Date: Wed, 28 Aug 2019 15:21:17 +0800	[thread overview]
Message-ID: <1566976878-14357-1-git-send-email-yang.huang@intel.com> (raw)

The RPMB authentication key is owned by the user (normally it’s a TEE or other TCB)
who calls virtio rpmb driver, but not owned by the virtio rpmb driver.
As a result, the user is in charge of calculating the MAC, packing the RPMB frame
and sending it to the driver.
Any changes on RPMB frame definition, including order, size, crypto algorithm will cause
to a different MAC.
If the frame definition is changed, it indicates software has to recognize it’s running
on a VM or not, and to maintain two different implementations to adapt virtio RPMB device
and hardware RPMB device.
In order to keep compatibility with native usage, keeping the definition of virtio RPMB
frame same as the hardware specification is perferred. 

struct virtio_rpmb_frame {
        u8 stuff[196];
        u8 key_mac[32]; <------------------------------
        u8 data[256]; ---------------->|                       ^
        u8 nonce[16]; ---------------->|                      ^
        be32 write_counter; -------->|             HMAC-SHA256()
        be16 address; ---------------->|-------------> | <-----------Authentication Key
        be16 block_count; ---------->|
        be16 result; ------------------>|
        be16 req_resp; -------------->|
};

v3 -> v4:
1. Remove multiple RPMB targets.
2. Remove NVMe RPMB.
3. typo fix.
4. Some wording changes for better understanding.
5. Add conformance.

v2 -> v3:
1. Remove conformance changes temporarily
   since the draft requires reviews and updates at this phase.
2. Add eMMC, UFS and NVMe as Normative References.
3. Add more details on:
   RPMB frame
   Request Type/Response Type
4. Add differentiation JEDEC RPMB and NVMe RPMB.
5. Define config layout
6. Illustrate behaviors of all RPMB requests 7. Remove RPMB device ID reservation,
   it will be submitted with an independent patch.

v1 -> v2:
1. update conformance.
2. wordings change:
   first initialization -> first device initialization
   device size -> device capacity
3. update Device Operation:
   add more decriptions on write counter, key and write operations.

Huang Yang (1):
  Add virtio rpmb device specification

 conformance.tex  |  20 ++++-
 content.tex      |   1 +
 introduction.tex |   6 ++
 virtio-rpmb.tex  | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 264 insertions(+), 1 deletion(-)
 create mode 100644 virtio-rpmb.tex

-- 
2.7.4


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


             reply	other threads:[~2019-08-28  7:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28  7:21 Huang Yang [this message]
2019-08-28  7:21 ` [virtio-dev] [PATCH v4 1/1] Add virtio rpmb device specification Huang Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1566976878-14357-1-git-send-email-yang.huang@intel.com \
    --to=yang.huang@intel.com \
    --cc=bing.zhu@intel.com \
    --cc=cohuck@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.fang@intel.com \
    --cc=tomas.winkler@intel.com \
    --cc=virtio-dev@lists.oasis-open.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox