]> git.proxmox.com Git - mirror_zfs.git/blobdiff - include/sys/spa.h
OpenZFS 4185 - add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R
[mirror_zfs.git] / include / sys / spa.h
index 0c71cca68d47bd2e32a48fcf717b4faa4dff18ab..3d0b962e68895379b4867bcbb4e249a06b1ec49b 100644 (file)
@@ -23,6 +23,7 @@
  * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright 2013 Saso Kiselkov. All rights reserved.
  */
 
 #ifndef _SYS_SPA_H
@@ -147,6 +148,14 @@ typedef struct dva {
 } dva_t;
 
 
+/*
+ * Some checksums/hashes need a 256-bit initialization salt. This salt is kept
+ * secret and is suitable for use in MAC algorithms as the key.
+ */
+typedef struct zio_cksum_salt {
+       uint8_t         zcs_bytes[32];
+} zio_cksum_salt_t;
+
 /*
  * Each block is described by its DVAs, time of birth, checksum, etc.
  * The word-by-word, bit-by-bit layout of the blkptr is as follows: