⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sqcts.h

📁 加密算法实现 Pegwit is a program for performing public key file encryption and authentication. Encr
💻 H
字号:
#ifndef __SQCTS_H
#define __SQCTS_H

/*
	Ciphertext Stealing (CTS) mode support

	IMPORTANT REMARKS:
	
	1.	This is a variant of  Cipher Block Chaining which relaxes the restriction
		that the buffer length be a multiple of  SQUARE_BLOCKSIZE.  Note that the
		buffer length must still be >= SQUARE_BLOCKSIZE.
	2.	The IV is encrypted to avoid the possibility of being correlated with the
		plaintext.
*/
  
#include "square.h"

typedef struct {
	squareKeySchedule roundKeys_e, roundKeys_d;
	byte mask[SQUARE_BLOCKSIZE];
} squareCtsContext;

void squareCtsInit    (squareCtsContext *ctxCts, const squareBlock key);
void squareCtsSetIV   (squareCtsContext *ctxCts, const squareBlock iv);
void squareCtsEncrypt (squareCtsContext *ctxCts, byte *buffer, unsigned length);
void squareCtsDecrypt (squareCtsContext *ctxCts, byte *buffer, unsigned length);
void squareCtsFinal   (squareCtsContext *ctxCts);

#endif /* __SQCTS_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -