So I am making an application that basically creates strings that must be encrypted before they are stored on a user's device. If the user blindly starts running the application without creating a password before hand OR they cannot come up with a long, strong password, would this method be appropriate? (Language is java)
- Create a probable prime of 512 bit length
- BigInteger.probablePrime(512, new Random())
- Add a random number of 512 bit length
- .add(new BigInteger(512, new Random()))
- Convert number into Base32
The above steps will yield a Base32 string that is about 100-103 characters long and will look something like this: 2si95285qk2trk65hona7q0j27o81ph6adjs2obd2g83q9nho52tonku7s3uajtja54ri2dkbque39hil14f1nrlef0736mtda7rtll
And it is up to the user to safely store this password if they do not create one themselves.
So my question, is this a plausible method to create a random password if the user does not make one before hand or cannot create a password this long (though it is not required)?