(… وَإِن كُنتُمْ عَلَىٰ سَفَرٍ وَلَمْ تَجِدُوا كَاتِبًا فَرِهَانٌ مَّقْبُوضَةٌ ) (And if you are on a journey and cannot find a scribe, then a security deposit [should be] taken …): There is no notary when on a journey. Then, there’s no harm to take a security deposit in such case. Islam has made the security deposit permissible in order to have an additional guarantee.
(… فَإِنْ أَمِنَ بَعْضُكُم بَعْضًا …) (…And if one of you entrusts another …): One person may not request any security deposit for the other person under such condition which is, again, linked to the fear of Allah (swt). Why? Because:
(… فَلْيُؤَدِّ الَّذِي اؤْتُمِنَ أَمَانَتَهُ وَلْيَتَّقِ اللَّهَ رَبَّهُ …) (…then let him who is entrusted discharge his trust [faithfully] and let him fear Allah, his Lord …) Thus, the whole thing is linked to the fear of Allah (swt).
(… وَلَا تَكْتُمُوا الشَّهَادَةَ …) (…And do not conceal testimony …): Here comes the witness after touching upon the notary, the debtor, the creditor, relations, … etc. The witness mustn’t conceal the testimony; it’s sinful to do so. When the right is concealed by the witnesses, the wrong would prevail. That’s why (swt) forbids concealing the testimony. There is a question here why it’s said here:
(… وَمَن يَكْتُمْهَا فَإِنَّهُ آثِمٌ قَلْبُهُ …) (…for whoever conceals it – his heart is indeed sinful …): Although the testimony is by the tongue rather than the heart, his heart is sinful because the heart is the source of all human and psychological inclinations as described by Prophet Muhammad (saws):
There is a piece of flesh in the body if it becomes good (reformed) the whole body becomes good but if it gets spoilt the whole body gets spoilt and that is the heart.”
 Hadith no. 52, Chapter: The superiority of that person who leaves all doubtful (unclear) things for the sake of his religion, Belief Vol. Sahih Al-Bukhari.