Torchcsprng

Latest version: v0.2.1

Safety actively analyzes 683322 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

9.2

since PyTorch stopped support of CUDA 9.2, torchcsprng also stopped supporting CUDA 9.2

Windows CUDA support (https://github.com/pytorch/csprng/issues/40)

Compilation issues with CUDA on Windows resolved and binaries with CUDA 10.1, 10.2, 11.1 support are available via pip and conda

Python 3.9 support

torchcsprng is available for Python 3.9 on Linux and Windows via conda and on Linux and Windows and macOS via pip

0.2.1

PyTorch/CSPRNG 0.2.1 Release Notes
---
float16 and bfloat16 support (121)
All torchcsprng functionality now support `torch.float16` and `torch.bfloat16` on all supported platforms

0.2.0

PyTorch/CSPRNG 0.2.0 Release Notes

New API: encrypt/decrypt (https://github.com/pytorch/csprng/pull/83)

torchcsprng 0.2.0 exposes new API for tensor encryption/decryption. Tensor encryption/decryption API is dtype agnostic, so a tensor of any dtype can be encrypted and the result can be stored to a tensor of any dtype. An encryption key also can be a tensor of any dtype. Currently torchcsprng supports [AES](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard) cipher with 128-bit key in two modes: [ECB](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_codebook_(ECB)) and [CTR](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_(CTR)).

* `torchcsprng.encrypt(input: Tensor, output: Tensor, key: Tensor, cipher: string, mode: string)`

> - `input` tensor can be any CPU or CUDA tensor of any dtype and size in bytes(zero-padding is used to make its size in bytes divisible by block size in bytes)
> - `output` tensor can have any dtype and the same device as `input` tensor and the size in bytes rounded up to the block size in bytes(16 bytes for AES 128)
> - `key` tensor can have any dtype and the same device as `input` tensor and size in bytes equal to 16 for AES 128
> - `cipher` currently can be only one supported value `"aes128"`
> - `mode` currently can be either [`"ecb"`](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_codebook_(ECB)) or [`"ctr"`](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_(CTR))

* `torchcsprng.decrypt(input: Tensor, output: Tensor, key: Tensor, cipher: string, mode: string)`

> - `input` tensor can be any CPU or CUDA tensor of any dtype with size in bytes divisible by the block size in bytes(16 bytes for AES 128)
> - `output` tensor can have any dtype but the same device as `input` tensor and the same size in bytes as `input` tensor
> - `key` tensor can have any dtype and the same device as `input` tensor and size in bytes equal to 16 for AES 128
> - `cipher` currently can be only one supported value `"aes128"`
> - `mode` currently can be either [`"ecb"`](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_codebook_(ECB)) or [`"ctr"`](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_(CTR))

CUDA 11 support (https://github.com/pytorch/csprng/issues/82)

CUDA 11 is now officially supported with binaries available via pip and conda

0.1.4

PyTorch/CSPRNG 0.1.4 Release Notes

Fixes

* Updates dependency on pytorch to `v1.7.1`

0.1.3

PyTorch/CSPRNG 0.1.3 Release Notes

Fixes

* Updates dependency on pytorch to `v1.7.0` (79)

0.1.2

PyTorch/CSPRNG 0.1.2 Release Notes

Features

The following list of methods are now supported:

| Kernel | CUDA | CPU |
|------------------------|------|-----|
| randperm(n) | yes* | yes |

* the calculations are done on CPU and the result is copied to CUDA

Bug Fixes

Strict-aliasing violation in csprng.h fixed (https://github.com/pytorch/csprng/issues/68)

Page 1 of 2

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.