passwords

How to design system to allow migration of encryption?

杀马特。学长 韩版系。学妹 提交于 2019-12-04 12:54:35
I want to set up a system where I am allow to migrate encrypted password (hash password), from one system to another. How would i do this? Say 2 month down the line, i found a encryption that is 10 times better and the current hash function has been proven without a doubt, totally vulnerable. How would I go about migrating user password from one type of hash to another (the better one). You can slowly migrate from a method to another using the following technique. I cannot guarantee its quality so please take it with a grain of salt (pun not intended). For example, consider the following table

Validate that password doesn't contain 3+ consecutive characters from name

痴心易碎 提交于 2019-12-04 12:19:34
I need to do this following password validation in Java Must be at least 8 characters in length Must contain at least 1 number Must contain at least 1 upper case letter Must contain at least 1 lower case letter Cannot contain 3 or more consecutive characters from your full name or your username (e.g. If your name is Will you couldn't have the password Stiller458 ) I have the first 4 points, how do I do the last one? Currently I have: String pattern = "^(?=.*[^a-zA-Z])(?=.*[a-z])(?=.*[A-Z])\\S{8,}$"; boolean passwordValidation = originalPassword.matches(pattern); For your 1,2,3,4 case ^(?=.*\d)

Ruby on Rails, Devise gem. How to remove current password when password is blank?

只愿长相守 提交于 2019-12-04 12:13:52
问题 Now I realise this topic has been covered many times before. However there did not appear to be a solution that wanted to make the current password field exempt only when the password in the database was blank. I currently have the password required in my user model like: def password_required? (authentications.empty? || !password.blank?) && super end Then I copied the update function across into my registrations controller: def update if resource.update_with_password(params[resource_name])

User Login with a single query and per-user password salt

纵然是瞬间 提交于 2019-12-04 11:59:02
I've decided to implement a user login using a per-user salt, stored in the database. The salt is prefixed to a password which is hashed with SHA and stored in the databse. In the past when I wasn't using a salt I would use the typical method of counting the number of rows returned by a query using the user inputted username and password. With a per user salt however, you need to get the salt before you can compare it with the stored password hash. So to avoid having two queries (1 to get the salt and another to validate the input credentials) I decided to get the salt AND the hashed password

Android Oreo: what should I do to publish my app as an Autofill service provider?

北城以北 提交于 2019-12-04 11:51:37
I'm an independent developer of a password manager app. What should I do, or what should I implement (interface/API/Service), to make my app an Autofill service provider (in a device with Android Oreo API >= 26)? I have read all kinds of related documentation, but I can't understand how to do this. Am I missing something? At the moment I see that only well-known password managers support this feature: Any hints are welcome. As usual, Google's own examples repository provides a good starting point for learning the Autofill Framework's API, and covers much more material than I can fit into an

PBE: Verify password before attempting to decrypt

拈花ヽ惹草 提交于 2019-12-04 10:58:34
I am making an application in Java and I want to allow users to encrypt a file (or folder - I'd zip the directory) using a password of their choice. I currently have the following method(s): static Cipher createCipher(int mode, String password) throws Exception { PBEKeySpec keySpec = new PBEKeySpec(password.toCharArray()); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); SecretKey key = keyFactory.generateSecret(keySpec); MessageDigest md = MessageDigest.getInstance("MD5"); md.update("input".getBytes()); byte[] digest = md.digest(); byte[] salt = new byte[8]; for

How secure is storing salts along with hashed password

为君一笑 提交于 2019-12-04 10:48:35
问题 If you had looked at table schema of asp.net membership system they store the hash of raw password along with salt used to produce it. see the schema below, dbo.aspnet_Membership ApplicationId UserId Password PasswordFormat PasswordSalt MobilePIN Email . . . If a attacker gets hold of the datbase isn't it easier for him to crack open the raw password from the salt and hashed password? After looking into some records it seems a new salt is generated for each password. What is significance of

Password Recovery without sending password via email

☆樱花仙子☆ 提交于 2019-12-04 10:21:15
So, I've been playing with asp:PasswordRecovery and discovered I really don't like it, for several reasons: 1) Alice's password can be reset even without having access to Alice's email. A security question for password resets mitigates this, but does not really satisfy me. 2) Alice's new password is sent back to her in cleartext. I would rather send her a special link to my page (e.g. a page like example.com/recovery.aspx?P=lfaj0831uefjc), which would let her change her password. I imagine I could do this myself by creating some sort of table of expiring password recovery pages and sending

Which Encryption algorithm does ProtectedData use?

那年仲夏 提交于 2019-12-04 10:01:53
For password encryption I want to use ProtectedData . As far as I found out, this is a wrapper for CryptProtectData . The MSDN only states something vague about encryption based on user credentials and that decryption usually must be done on the same machine, if user has no roaming profile. Which encryption algorithm does it use? Is there any analysis that states whether this encryption is suiting for password storage? How else to implement a local password storage? This MSDN article has more information about CryptProtectData and DPAPI , and should contain the information you need. In

Spring security Oauth2 Resource Owner Password Credentials Grant

戏子无情 提交于 2019-12-04 09:59:35
问题 Have just installed spring security oauth2 in my eclipse IDE. The service am trying to implement will be consumed by second party users through their installed applications hence i chose to use password grant type. As per my understanding of Oauth2 the following request should work for the demo sparklr2 service without the need of me encording the username and password parameters. i.e POST http://localhost:8080/sparklr2/oauth/token?grant_type=password&client_id=my-trusted-client&scope=trust