cyphr | : shipit : Humane encryption | Encryption library
kandi X-RAY | cyphr Summary
kandi X-RAY | cyphr Summary
High-level functions for supporting encryption and decryption of data from R. This allows secure storage and exchange of information, while trying to keep the encryption/decryption code from taking over your analyses. cyphr wraps the lower-level support from sodium and openssl. This package is designed to be easy to use, rather than the most secure thing (you're using R, remember - for examples of what cyphr can't protect against see jammr, rpwnd and evil.R.).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of cyphr
cyphr Key Features
cyphr Examples and Code Snippets
Community Discussions
Trending Discussions on cyphr
QUESTION
Suppose I create a key using R's cyphr library
...ANSWER
Answered 2021-May-31 at 02:21One option is split the string at the space with strsplit
, loop over the list
of values, convert to raw
through hexmode
QUESTION
Note: This (lengthy) question is a follow-up to my previous post.
I would like to achieve the encryption of data locally (local RStudio) and decrypt the encrypted data remotely (application hosted on shinyapps.io).
The first part of the code intrinsically encrypts a data-frame using a key
. The second part of the code is a shiny application that decrypts the data-frame using the same key
and thereby using this data-frame for authentication purposes within the application. The code works just alright on my machine.
However, it throws an error when published to shinyapps.io (cloud-based hosting service) as shown below:
1.Code for encrypting the data-frame.
...ANSWER
Answered 2020-Mar-13 at 08:16Reason for the issue
The problem is by design as cyphr::key_sodium
creates a key which is valid, well, only for the current session. That is, it is not possible to share it across different session let alone different systems.
Hence, the problem is not at all related to shiny
itself, but to the fact that you are trying to use cyphr
keys across different sessions.
From the vignette:
When using key_openssl, keypair_openssl, key_sodium, or keypair_sodium we generate something that can decrypt data. The objects that are returned by these functions can encrypt and decrypt data and so it is reasonable to be concerned that if these objects were themselves saved to disk your data would be compromised.
To avoid this, cyphr does not store private or symmetric keys directly in these objects but instead encrypts the sensitive keys with a cyphr-specific session key that is regenerated each time the package is loaded. This means that the objects are practically only useful within one session, and if saved with save.image (perhaps automatically at the end of a session) the keys cannot be used to decrypt data.
Reprex of the issue
QUESTION
I'm working on encrypting a csv.
file as a local user and decrypting the same file as a remote user, using R
language with the help of sodium
and cyphr
packages. I came across this documentation which suffices the requirement (https://www.rdocumentation.org/packages/cyphr/versions/1.0.2/topics/key_sodium). However, I face a stumbling block in saving and transferring the key to the remote user.
Adapted example from the documentation (limiting to a string
instead of csv.
):
ANSWER
Answered 2020-Feb-28 at 14:31As for how to transmit a key to a remote user, see this Information Security Stack Exchange post.
The error comes from the fact that saveRDS
does not return a value. And you have not saved anything to a file, that code line gives an error. The right way of encrypting and saving to a file would be
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cyphr
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page