Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cryptex size not is enought for keystore #17

Open
jordizspmobile opened this issue Sep 24, 2019 · 1 comment
Open

Cryptex size not is enought for keystore #17

jordizspmobile opened this issue Sep 24, 2019 · 1 comment

Comments

@jordizspmobile
Copy link

jordizspmobile commented Sep 24, 2019

When I try to execute the cryptex_generate_keystore this create a simple 1024 bits keysize and it doesn't allow me modify that value then Android return:

Caused by: java.security.InvalidKeyException: Failed to sign using signer "CERT"
	at com.android.apksig.internal.apk.v1.V1SchemeSigner.signManifest(V1SchemeSigner.java:295)
	at com.android.apksig.internal.apk.v1.V1SchemeSigner.sign(V1SchemeSigner.java:256)
	at com.android.apksig.DefaultApkSignerEngine.outputJarEntries(DefaultApkSignerEngine.java:657)
	at com.android.tools.build.apkzlib.sign.SigningExtension.onOutputZipReadyForUpdate(SigningExtension.java:305)
	... 33 more
Caused by: java.security.InvalidKeyException: Failed to sign using SHA1withDSA
	at com.android.apksig.internal.apk.v1.V1SchemeSigner.generateSignatureBlock(V1SchemeSigner.java:519)
	at com.android.apksig.internal.apk.v1.V1SchemeSigner.signManifest(V1SchemeSigner.java:293)
	... 36 more
Caused by: java.security.InvalidKeyException: The security strength of SHA-1 digest algorithm is not sufficient for this key size
	at com.android.apksig.internal.apk.v1.V1SchemeSigner.generateSignatureBlock(V1SchemeSigner.java:515)
	... 37 more
@jordizspmobile
Copy link
Author

jordizspmobile commented Sep 24, 2019

@hjanuschka you need add the next params to cryptex_generate_keystore.rb:

cmd = "keytool -genkey -v -keystore #{File.expand_path(params[:destination])} -storepass #{params[:password]} -keypass #{params[:password]} -keyalg #{params[:keyalg]} -keysize #{params[:keysize]} -alias #{params[:alias]} -dname 'CN=#{params[:fullname]},L=#{params[:city]}' -validity 10000"

And if you want work in Android you need add -keyalg RSA and -keysize 2048

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant