Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Edit after some clarifications</strong>:</p> <p>I still think that the product code and the matching 3rd party response cannot be constant - otherwise it can be shared will other users, which will thus be able to give the response code without going to the 3rd party.</p> <p>If the product code is constant, a possible approach is that the 3rd party response depends on <strong>both</strong> the code and the user's phone number, and so is your validation. This way, each response is both product and user specific.</p> <p>The specific permutation of the Luhn algorithm isn't too important in my opinion - if someone can crack one variation, he'll probably be able to crack another one.</p> <p><strong>Original Answer</strong>:</p> <p>In short, I think you can use the Luhn algorithm, if you give the user a one-time ticket, valid for a limited amount of time.</p> <ul> <li>First, if I understand the problem correctly, your product code cannot be constant - otherwise the response created by the 3rd party will always be the same for this product. This means the user will be able to use this code again later, or even give it to another user.</li> <li>Therefore, I think you should generate and give the user a random new code per his request of information/access to the product. This code should be valid for this product for a limited period of time (an hour, a day, depending on your needs).</li> <li>The response sent by the 3rd party to the user should be valid only when entered together with the code you provided to the user.</li> <li>After validation, this code cannot be used until the specified time period is over.</li> <li>As an option, I think you and the 3rd party can append something like the current date to the code and response pair during computation, so they are not always the same pair.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload