New answers tagged

1

Just some additional information from me as well, as I ran into an issue with all of this today, that cost me half a day. I got the "The signature of this file is corrupt or invalid." from Edge as well. Windows told me that my file (which was already signed with SHA256), is not secure and also failed to show me the correct cert information (Only "Unknown ...


2

It depends on the order of operations. If A signed the email and then encrypted it with B's public key, then when B decrypts the email, the signature is still valid, and thus B can sign the email signed by A and encrypt it with C's public key. When C receives the email, they can decrypt the email and check both signatures and all is well. If however A ...


1

Yes. Once B decrypts from A, B can encrypt the message with C's public key and C will be able to decrypt and read message. B decrypting the message from A is crucial however, if B does not and just encrypts the ciphertext from A with C's key, C will be be able to decrypt the outer layer, but will then be stuck with an encrypted message that only B can ...


2

Some questions can be answered, other are speculative. X.509 relies on ASN.1. ASN.1 defines two data types for dates, UTCTime and GeneralizedTime. UTCTime has only two digits for the year, so it is not Y2K-clean; it was defined in the late 1980s out of what can only be described as a consummate lack of foresight. It was temporarily fixed by defining that ...


0

Output size of RSA encryption always equivalent to RSA key size. In your case of Sha1RSA 2048 signing, 160 bit sha1 digest is padded as per PKCS#1 padding scheme in order make input block equivalent to RSA key size and then encrypted with RSA private key which results in 2048 bit signature.


11

Use Android SafetyNet. This is how Android Pay validates itself. The basic flow is: Your server generates a nonce that it sends to the client app. The app sends a verification request with the nonce via Google Play Services. SafetyNet verifies that the local device is unmodified and passed the CTS. A Google-signed response ("attestation") is returned to ...


0

This problem is something that mobile games have to deal with for income reasons, and from what I can tell, they deal with this by constantly updating the app, requiring the user to download and install a fresh patch every time before they start the game. usually this is a small amount. These patches also add new content to the game. The patches also handle ...


18

This is impossible. Anyone who has the integer APK file can decompile it and make a malicious clone that behaves in exactly the same way towards the server.


2

OpenPGP also hashes the package content's, but additionally cryptographically signs the hash. A simply hash sum only allows to detect transmission problems. It does not allow to detect attacks, at least not as long as the hash is not verified through some secure channel. Given the signer's key was validated and is trusted, OpenPGP provides such a secure ...


1

The hashing function is used only to check package integrity for transmission errors (which is done by verifying its checksum). It cannot provide any way to authenticate the maker of the package. PGP can be used to verify the signature of the package (or of any other piece of data) over the maker's public key, hence certifying its provenience.


0

The Boneh-Lynn-Shacham signature scheme works only in special elliptic curves that support efficient pairing computations. This is not something that you somehow add on top of an existing signature; it is a signature algorithm in its own right, that uses its own kind of public/private key pairs. If you want something that works with X.509, then you need a ...


1

That is the basic idea, but you probably don't want to implement a custom solution. Depending on your operating system there is probably already a mechanism, for example Debian's SecureApt which leverages GPG. https://wiki.debian.org/SecureApt


0

Not as a full answer, but for some additional overview information, including signtool example lines for dual signing (XP/Vista compatibility) I managed to switch nicely to dual-signing in my build chain according to this very good blog post from ksoftware.net, our certificate supplier. I wrote a small batch file to dual-sign a file with the two ...


0

I just went through the same issue with our Windows apps. So here's some info for you: A) As you pointed out SHA-1 hash is being phased out due to it's inadequate collision resistance. Or, in other words, it doesn't produce code signatures that are strong enough by today's crypto-standards. B) To code-sign your executable you'll need to have a code-signing ...


3

OpenPGP Signatures The program outputs a small picture.sig file to the destination folder. What does this file contain? [...] But the .sig file should also contain entire certificate, or maybe a fingerprint of it. What does it contain? How does Kleopatra automatically choose the right certificate? OpenPGP signatures can contain the original ...


1

As already stated, this is that way by design. Probably MSDN article could (or should) be more explicit about that. The way you extracted the "signed" data is wrong. The XMLDSig documentation is clear about it. You may want to read section 8.1 of this link https://www.w3.org/TR/xmldsig-core/ Just as a user should only sign what he or she "sees," persons ...


1

XML Signature are prone too many attacks. That is due to the way XML as a file format is defined and how it is implemented by (parsing) frameworks. https://www.owasp.org/images/5/5a/07A_Breaking_XML_Signature_and_Encryption_-_Juraj_Somorovsky.pdf https://lists.w3.org/Archives/Public/public-xmlsec/2009Nov/att-0019/Camera-Ready.pdf


1

To me, this seems not really as a error of the protocol but as wrongly used. You get a part of the XML using Doc.SelectSingleNode("/message/msgenvelope") but you never checked that "/message/msgenvelope" is actually the signed part of the XML! You have to treat the XML more like a file system with different files and not like one entity. Think like this: ...


2

I do not see any public key being "attached" into the CSR. It's there. Here's where: When you generate your key like so: $ openssl genrsa -out server.key 1024 Generating RSA private key, 1024 bit long modulus ....................................++++++ ......++++++ e is 65537 (0x10001) And you generate your CSR like so: $ openssl req -new -key ...


0

Q1 For public websites the most safe approach, or the only safe way is to use certificates from a trusted CA. However, in many scenarios we can use a self signed certificate to get "safe" connections with a web site. Browsers can't trust in SSC at all, but it launch a scary warning to prevent users about a posible untrusted and risky site. Q2 A server key ...


0

It is unclear to me exactly why you are implementing such a complex authentication mechanism. Homegrown authentication solutions are notoriously difficult to get correct. So my first thoughts are to try and steer you to more standard mechanisms. In summary, my recommendation is to use username/password for authentication. If you have a good reason not to ...


0

1) A self-signed certificate uses your key to sign itself; there is no CA involved, there is nothing to verify. The certificate will basically verify that it is matching the key but nothing more, so it serves no real verification purpose. Your browser will pop up a self-signed certificate warning, which means that the key is not certified by anyone. This ...


0

If a reliable provider wants to change their JavaScript, they have to update the integrity hash and distribute that to all possible users. Not if the caching policy means that the referer will not be cached for longer than the referee. It's another strong argument for using long expiration times for static content and injecting a variable into the URL. ...


4

A: Authentication only. You can still do "null" encryption afterwards, if you like. But if you do non-null encryption, then you'll have an idea of who with you're doing that. That's the authentication part. -- There used to be a time when SGC, Server-Gated-Cryptography, was a thing. An extra bit in the certificate would either allow or disallow any decent ...


0

To answer Q3, Verisign's public key (actually its root certificate) is included in your web browser, along with a lot of other root certificates.


5

I've now found an example of an actual download that was signed using an SHA-1 certificate after 1/1/2016. I downloaded KeePass 2.31 using Edge on Windows 10. Edge tells me that "The signature of this file is corrupt or invalid." If I right-click and select "run anyway", our double-click the file in Windows Explorer, SmartScreen blocks the file: ...


0

GnuPG does not allow to restrict the key set without specifying another key file. Use --no-default-keyring to disable the default keyring containing all the keys, and then specify a keyring (which can be a single exported key!) with --keyring public-key.asc. If necessary, export the key immediately before verifying the signature: gpg --export [user ID|key ...


-1

I see that you are doing this from Java. You might want to take a look at the Bouncy Castle library which allows you to work with OpenPGP data in Java, instead of having to call gpg. Look at this question to get started: http://stackoverflow.com/questions/19173181/bouncycastle-pgp-decrypt-and-verify


0

You could write a shell script to do that easily of course: Using DOS CMD file called vsig.cmd: @echo off gpg --verify %1 > %temp%\result.txt 2>&1 grep "%2" %temp%\result.txt if errorlevel 1 ( echo File was NOT signed by %2 exit /b 1 ) else ( echo File was signed by %2! exit /b 0 ) This will provide the following output: >vsig ...


0

You could, perhaps, use a keyring with only that specific key in it, and specify the keyring on the command line (using --no-default-keyring --keyring <file> ) Note that unless you have signed the key used to create the signature, the user name in GnuPG's output is not a good thing to check. Anybody can generate a valid key with a certain user name. ...


1

There are 3 digests in a timestamped Authenticode signature that you have control over. The digest of your certificate. A recently purchased certificate will use SHA-256. Most CAs switched to issuing SHA-256 certificates during 2014. They only provide SHA-1 certificates on special request. A quick way to check your certificate is to right-click on an ...



Top 50 recent answers are included