(There are two different reasons for asking this type of question - because you want to link purchases to the same user and want to see duplicate identifiers or because you want to differentiate two receipts and want to see something unique in a receipt.)
Both are the transactionIdentifier and the originalTransaction.transactionIdentifier are unique to that user. I believe that for a non-consumable IAP both are also unique to a device owned by that user and you cannot use either of them to link two devices to the same user. That may not be the case for an autorenewable subscription, but I am not sure.
In the method "updatedTransactions":
The value for transaction.transactionIdentifier is unique to that transaction (that user and that user's device) - whether it is an original purchase, a restoreCompletedTransaction or a repurchase (for free) of a previously purchased non-consumable IAP. If the purchase is a restoreCompletedTransactions there will be a transaction.originalTransaction.transactionIdentifier that is unique to that user but is not unique in that it is the same thing as the transaction.transactionIdentifier of the original transaction so it might have appeared at other times (restores and repurchases) and on other devices (restores) owned by that user. For an autorenewable subscription, each renewal will have a new transaction.transactionIdentifier but the same transaction.originalTransaction.transactionIdentifier. As noted above, I am unsure for an autorenewable IAP whether, after a restoreCompletedTransaction on device 2, the transaction on device 2 will have the same values as on device 1 or whether they will be different.
In the receipt:
The value for the original_transaction_id will be the transaction.transactionIdentifier for the original purchase. For an autorenewable that is the transaction.transactionIdentifier for the first purchase of the subscription. For an autorenewable subscription, the value for the transaction_id will reflect the most recent renewal's transaction.transactionIdentifier. For all other IAPs, the value for the transaction_id is the transaction.transactionIdentifier of the original purchase (this is a bug - the documents indicate otherwise). It will therefore be the same as the original_transaction_id for all subsequent restores and repurchases. That means for a non-consumable IAP when you restoreCompletedTransactions (or refresh the receipt or repurchase for free) the unique value for the transaction.transactionIdentifier (see above) will not appear in the receipt. Rather, the value for the transaction_id will be the transaction.originalTransaction.transactionIdentifier. Therefore, there is no way to assure that a recipt has not been copied except to check both the creation_date and the transaction_id.