Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Suppose I have a server that generates a private key in memory upon starting.
Is there anyway for a snooping administrator (say from Heroku or Nodejitsu) to recover that private key while that server instance is running (i.e. somehow access it within memory)?
If it matters, I'm running this on Node.JS
It depends on what systems do they use and if they have features to prevent that from happening. Otherwise I can say that administrators who have access to the host can get your private key in so many ways. For example they can freeze your instant and save its state which basically copies the memory to the hard-disk, then unfreeze it and that doesn't take long on fast systems. Also they can dump the memory of your instance since it is simply a running app under the hypervisor. These might not be easy to do but based on my experience in the security field I can say they are very possible.
However, I think you should store the encrypted version of your key in the memory. And only decrypt it when it is being used so the decrypted version is only stored temporarily in the CPU registers.
You don't just generate a private key, you generate a key pair. Then you must make sure that the other party uses the trusted public key of that key pair (to verify signatures or encrypt data). If they just use any public key then they cannot be sure it does not belong to an attacker. So even if the admin does not get access the private key, they simply can replace the public key with one they generated. So you would have a huge opportunity for a man in the middle attack.
Key management is hard. You cannot simply replace it with some haphazard scheme. There are a lot of (security) disadvantages about generating a key pair on each run as well. In general, it is not such a good idea.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
The H2O R package is a great resource for building predictive models. But I am concerned with the security aspect of it.
Is it safe to use patient data with H2O in terms of security vulnerabilities ?
After data ingestion into H2O-3, the data lives in-memory inside the java server process. Once the H2O process is stopped, the in-memory data vanishes.
Probably the main thing to be aware of is your data is not sent to a SaaS cloud service or anything like that. The H2O-3 java instance itself handles your data. You can create models in a totally air-gapped, no-internet environment.
So the short answer is, it’s perfectly safe if you know what threats you are trying to secure against and do the right things to avoid the relevant vulnerabilities (including data vulnerabilities like leaking PII and software vulnerabilities like not enabling passwords or SSL).
You can read about how to secure H2O instances and the corresponding R client here:
http://docs.h2o.ai/h2o/latest-stable/h2o-docs/security.html
(Note if you have a high-value use case and want detailed personal help with this kind of thing, H2O.ai the company offers paid enterprise support.)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I have a encrypted file and i am aware of its password. I am trying to decrypt it but i could not find any properties of this file such as the type of algorithm/program that was used to encrypt the file originally.
I am thinking to try 'gpg' and 'openssl' and other techniques that can be used to decrypt this file without corrupting it. Although i have taken the backup, it's a huge file which takes roughly 3hrs for backing up. Hence i am extra careful so that it does not goes corrupt.
Thanks,
The general idea of encryption is that the result should be indistinguishable from the noise.
That automatically means, that unless you know all the parameters, you won't be able to infer it from the encrypted file if it was done right.
Unless you brute force all the possible types of encryption and their parameters (good luck with that!).
In a nutshell, you are going to have to find out what program was used to encrypt the file, and maybe, possibly (but probably not) have to know how the program was configured. People have been using computers for encryption almost as long as computers have existed. There are hundreds of different encryption programs that have been published over the years.
Your best bet is to get the developer to tell you which program he used and how to use it.
Your next best bet is to search through your backups of every machine he used looking for some clue as to what program he used.
If that doesn't help, it's time to start trying every encryption program you can get hold of. Obviously, you'll want to start with the newer ones, and the more popular ones, and the ones that run on whatever operating systems he was known to use.
Considering the size of the file, it's likely that you're dealing with an encrypted archive or, an image of an encrypted file system. So, don't limit your search to specialized encryption utilities. You'll also want to try all of the different archivers and all of the different file systems and operating systems that offer encryption as a feature.
If you've tried every encryption program without success, and you still haven't blown your budget; then the next step is going to blow your budget. I'm pretty confident in saying that because if your organization was the kind that could afford to take the next step, then you wouldn't be asking how to do it on StackOverflow. Heck! You probably would not even be allowed to use StackOverflow without written permission from three levels up the hierarchy.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I wondering whether the following security concept is suitable for a web app:
1) Login UI availabe only over SSL.
2) Login UI consists with 3 fields:
List item
User name,
File upload box,
Pin field.
File for upload box is emailed to user during registration process.
This file is a long sequence (few kilobytes or few dozens of kilobytes) of random bits.
This file scrambled using pin value, than its hash like SHA-512 calculated in an multi-layer manner, like so - many times calculate the hash, appending or prefixing the hash from previous iteration to last processed blob.
F(n) IS (
IF n == 0
THEN HASH(SCRAMBLE(file, pin))
ELSE HASH(IF n mod 2 == 0 THEN CONCAT(F(n-1), FILE) ELSE CONCAT(FILE, F(n-1));
Pin is displayed during registration on screen as image, so this pin is ONLY displayed on screen, but never transmitted to user as plain text.
Is this enough secure?
Thanks for comments.
Possible contexts or types of web apps:
a) business website (with payments processing in behalf of site owner).
b) intranet or corporate website with access to a special section for customers.
The answer is no.
The large file is sent via email which is not secure. In addition you are requiring the user to upload each time (s)he logs on; (a) that's a total pain in the rear, and (b) most users are going to leave the file hanging around on their computer's disk somewhere. The ratio of security : user inconvenience is extremely low, I wouldn't do it.
If you need to be extremely secure, use a strong password plus a true out of band, single-use token such as an SMS message that they need to request each and every time they use a new computer. Use the password and the single-use token to authorize the download of a larger machine-specific cookie that is tied to their machine in some manner (e.g. device signature plus IP address of some kind), and re-require the use of the out-of-band SMS if anything doesn't match up.
Also, don't forget about phishing mitigations.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
in Encryption and decryption same key is use to to convert plan text to cipher and cipher to plan text. so why in public key cryptograpy method sender Encrypt using receiver public key and receiver decrypt using his own private key ?
What you initially refer to is symmetric encryption (shared key), which allows 2 entities to communicate securely based on a single shared key that is only known to the two entities. This key can be exchanged several ways, but can't be publicized for obvious reasons.
Asymmetric encryption (public/private key) allows 2 entities to communicate securely as follows:
If one party wants to accept secure (encrypted) information, they need a key that isn't visible to the world (private), but they also have to be able to provide a key to anyone who wants to send encrypted information (public).
So I can give my public key out to the whole world and know the data is secure since only I have the private key, therefore I'm the only one who can decrypt it.
See Asymmetric Encryption in this Microsoft article: http://support.microsoft.com/kb/246071
Because it wouldn't be secure the other way around, or feasible either. Only the recipient has his private key, so nobody else can use it.
I want to follow up on the questions posted here:
Encryption with multiple different keys?
I've implemented the GnuGP solution for a web app I built but I fell into scalability issues pretty quickly and I have to admit I have been a bit stuck. Basically, it is true that you can encrypt a file with multiple public keys so all those people can decrypt the file. Great. But now imagine you share this file with 100 people, how do you do that?
The first limit I've encountered is the command line limit, where I cannot put in one line 100 public keys..
The second limit is everytime I want to add a new person or revoke access to someone, I have to re-encrypt with the 101 or 99 keys which is very time & CPU consuming.
The Third limit is even worse, let's say I'm sharing a folder, every new person getting access to the folder requires the re-encryption with ALL people of each file of the folder..
All this seems very dirty/hacky.. Anyone would have a better solution?
Thanks
Create a random AES secret key per folder, and use that to encrypt the files, e.g. using AES EAX. Then encrypt this key using the public keys of the persons you want to give access to. If you add a person later on, decrypt with an "admin" private key, and simply encrypt the secret key with the public key. You can use a hash (e.g. SHA-256) over the filename as the initial counter for the EAX cipher.
As for command line tools, you are better off programming this stuff (using GnuPG itself for C/C++ and related and Bouncy Castle for Java apps, for instance).