Documentation
¶
Overview ¶
A package that implements and exposes a test implementation of NTLSSE from the paper "Nowhere to Leak: Forward and Backward Private Symmetric Searchable Encryption in the Multi-Client Setting" (https://eprint.iacr.org/2021/903.pdf)
Index ¶
- Constants
- func AESDecrypt(key []byte, ciphertext []byte) []byte
- func AESDecryptInvertible(key []byte, ciphertext []byte) []byte
- func AESEncrypt(key []byte, plaintext []byte) []byte
- func AESEncryptIvSame(key []byte, plaintext []byte) []byte
- func CalculateAddress(numOfFiles uint64, searchToken []byte) []byte
- func CalculateSearchToken(aesKey []byte, hashedWord []byte, NoSearch uint64, encryptor IEncryptService) []byte
- func CalculateValue(fileKey []byte, Identifier string, NoFiles uint64, encryptor IEncryptService) []byte
- func CleanFiles()
- func GenerateKey() ([]byte, []byte)
- func HashWord(word string) []byte
- func HashWords(words []string) [][]byte
- func PKCS5Pad(plaintext []byte) []byte
- func PKCS5Trim(plaintext []byte) []byte
- func SanitizeString(s string) string
- type AESEncryptor
- func (AES *AESEncryptor) FileDecrypt(key []byte, ciphertext []byte) []byte
- func (AES *AESEncryptor) FileEncrypt(key []byte, plaintext []byte) []byte
- func (AES *AESEncryptor) GenerateFileKey() []byte
- func (AES *AESEncryptor) GenerateTokenKey() []byte
- func (AES *AESEncryptor) InvertibleDecrypt(key []byte, ciphertext []byte) []byte
- func (AES *AESEncryptor) InvertibleEncrypt(key []byte, plaintext []byte) []byte
- type Document
- type DocumentHandled
- type IEncryptService
- type LupMember
- type NTLSSE
Constants ¶
const AddDel = "./AddDel"
const AllMapMessageFile = "./AllMap"
const DaAckFile = "./DaAck"
const FileKeyMessageFile = "./FileKey"
Communication files
const IndexMessageFile = "./Index"
const IndexToDaMessageFile = "./IndexToDa"
const IndexUpdate = "./IndexUp"
const QueryMessageFile = "./Query"
const QueryResultMessageFile = "./DaToClient"
const TAUpdate = "./TaInUp"
const TaQueryMessageFile = "./TaQuery"
const TokenKeyMessageFile = "./TokenKey"
Variables ¶
This section is empty.
Functions ¶
func AESDecrypt ¶
decrypts a plaintext with the IV supplied at the beginning of the cipher
func AESDecryptInvertible ¶
This is an decryption function with a hard coded IV to be used as an IPSF reverse
func AESEncrypt ¶
Encrypts a plaintext with AES cbc and include the iv at the beginning
func AESEncryptIvSame ¶
This is an encryption function with a hard coded IV to be used as an IPSF
func CalculateAddress ¶
Calculates the address to be saved for a search token
func CalculateSearchToken ¶
func CalculateSearchToken(aesKey []byte, hashedWord []byte, NoSearch uint64, encryptor IEncryptService) []byte
Calculates a search token for searching through SSE
func CalculateValue ¶
func CalculateValue(fileKey []byte, Identifier string, NoFiles uint64, encryptor IEncryptService) []byte
func CleanFiles ¶
func CleanFiles()
func SanitizeString ¶
A very basic function that sanitizes a string after it has been gotten from the command line or file
Types ¶
type AESEncryptor ¶
type AESEncryptor struct {
}
The default encryptor for tests. Can be overridden to use other types of functions
func (*AESEncryptor) FileDecrypt ¶
func (AES *AESEncryptor) FileDecrypt(key []byte, ciphertext []byte) []byte
func (*AESEncryptor) FileEncrypt ¶
func (AES *AESEncryptor) FileEncrypt(key []byte, plaintext []byte) []byte
func (*AESEncryptor) GenerateFileKey ¶
func (AES *AESEncryptor) GenerateFileKey() []byte
func (*AESEncryptor) GenerateTokenKey ¶
func (AES *AESEncryptor) GenerateTokenKey() []byte
func (*AESEncryptor) InvertibleDecrypt ¶
func (AES *AESEncryptor) InvertibleDecrypt(key []byte, ciphertext []byte) []byte
func (*AESEncryptor) InvertibleEncrypt ¶
func (AES *AESEncryptor) InvertibleEncrypt(key []byte, plaintext []byte) []byte
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
func CreateRandomDocuments ¶
Generates random documents to use as test data without duplicate words in their content
type DocumentHandled ¶
func HandleDocument ¶
func HandleDocument(d Document, fileKey []byte, encryptor IEncryptService) DocumentHandled
type IEncryptService ¶
type NTLSSE ¶
type NTLSSE struct {
// contains filtered or unexported fields
}
func (*NTLSSE) Add ¶
Runs the update algorithm from the NTL paper adding a document doc is the singular doc to be added to the csp
func (*NTLSSE) Delete ¶
Runs the first part of the update algorithm from the NTL paper. Rest of the delete algorithm is run when a search is started. Identifier is the identifier of the document to be deleted