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

PSP Encryption Option #1

Open
cyberphone opened this issue Apr 15, 2021 · 2 comments
Open

PSP Encryption Option #1

cyberphone opened this issue Apr 15, 2021 · 2 comments

Comments

@cyberphone
Copy link
Member

cyberphone commented Apr 15, 2021

The current specification is based on that Issuers (or delegates of theirs), decrypt FWP assertions.

There may be scenarios where PSPs would be more suitable performing this step. Suggestion:

Make encryptionKey, contentEncryptionAlgorithm, and keyEncryptionAlgorithm in a credential entry optional.

The following modified sample code shows how this could be accomplished:

const methodData = [{
  supportedMethods: "fido-web-pay/v1",
  data: {
    payee: "Space Shop",  // Shown in the UI
    networks: [{
      name: "https://emvco.com/fwp/mastercard",
      encryption: {                           // New optional element
        encryptionKey: {
                                              // JWK
        },
        contentEncryptionAlgorithm: "...",    // JWE compatible
        keyEncryptionAlgorithm: "..."         // JWE compatible
      }
    },{
      name: "https://emvco.com/fwp/visa"
    },{
      name: "https://europeanpaymentsinitiative.eu/fwp",
      networkData: "additional stuff..."
    }]
  }
}];

That is, the payment method https://emvco.com/fwp/mastercard may use PSP encryption and decryption.

If a selected credential contains the encryption parameters and they are supplied in the associated networks object as well, the credential parameters takes precedence. That is, Issuers always stay in control of the encryption policy.

If neither the selected credential nor the associated networks object contains encryption parameters, an exception MUST be thrown.

In all cases all three parameters MUST either be available or absent, otherwise an exception MUST be thrown.

@cyberphone
Copy link
Member Author

This is probably a rather bad idea, Delegated Authorization can do the same thing and can also control who is actually allowed to decrypt. If the purpose for finding out peoples account numbers is only related to aggregating data, this is not the right way. Loyalty cards is the way to go for managing relations.

@cyberphone
Copy link
Member Author

cyberphone commented Dec 5, 2021

I think this idea needs more work because the current draft may a bit too static with respect to encryption. The issuer should still be in control. Discovery services may be the right approach although they add some complexity to the client application.

PSP-based encryption should only require merchants supplying a URL which merchants could fetch from the PSP on a daily basis. The client could then cache key URLs so that only when there is a new URL there would be a need to fetch encryption parameters. The encryption parameters would then be:

  • Public Key
  • Key Id
  • Key Encryption Algorithm
  • Content Encryption Algorithm

For issuer-based encryption things are slightly more complicated since there is no way to signal that a new key is available. However, it should be sufficient if the client updates this on a periodic basis with low frequency, like once in a week. Maybe an expiration time could be motivated? Note that issuers must be prepared to deal with old keys as well.

A static URL in the credential database would then return encryption parameters like above but a list of supported PSP domains as well. That is, if a PSP-suppled encryption key URL is not in the list of trusted domains, the client must reject the payment request.

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