Cara menggunakan php rsa encryption

Norwegian Tax Administration, “Requirements and guidelines for implementing digital signatures in Cash Register Systems,” Requir. Guidel. Implement. Digit. signatures Cash Regist. Syst., no. July, 2017.

F. Nuraeni, Y. H. Agustin, and I. M. Muharam, “Implementasi Tanda Tangan Digital Menggunakan RSA dan SHA-512 Pada Proses Legalisasi Ijazah,” Konf. Nas. Sist. Inf., pp. 864–869, 2018.

S. R. Lenka and B. Nayak, “Enhancing Data Security in Cloud Computing Using RSA Encryption and MD5 Algorithm,” vol. 2, no. 3, pp. 60–64, 2014.

R. Ganesan, M. Gobi, and K. Vivekanandan, “A novel digital envelope approach for a secure e-commerce channel,” Int. J. Netw. Secur., vol. 11, no. 3, pp. 121–127, 2010.

B. K. Hutasuhut, S. Efendi, and Z. Situmorang, “Digital Signature untuk Menjaga Keaslian Data dengan Algoritma MD5 dan Algoritma RSA,” InfoTekJar (Jurnal Nas. Inform. dan Teknol. Jaringan), vol. 3, no. 2, pp. 164–169, 2019, doi: 10.30743/infotekjar.v3i2.1019.

A. H. Mansour, I. Technology, and S. Arabia, “Journal of Soft Computing and Decision Support Systems Encryption and Decryption Analysis of the RSA Digital Signature Based on MD5 and SHA Hash Functions Using Strong Prime,” An Int. J. JSCDSS, vol. 4, no. 1, pp. 7–15, 2017.

N. Arora, Emerging Trends in Information Technology, vol. 16, no. 16. 2015.

M. Ihwani, “Model Keamanan Informasi Berbasis Digital Signature Dengan Algoritma Rsa,” CESSJournal Comput. Eng. Syst. Sci., vol. 1, no. 1, pp. 15–20, 2016.

N. Saxena and N. S. Chaudhari, “Secure encryption with digital signature approach for Short Message Service,” Proc. 2012 World Congr. Inf. Commun. Technol. WICT 2012, pp. 803–806, 2012, doi: 10.1109/WICT.2012.6409184.

E. C. Prabowo and I. Afrianto, “Penerapan Digital Signature Dan Kriptografi Pada Otentikasi Sertifikat Tanah Digital,” Komputa J. Ilm. Komput. dan Inform., vol. 6, no. 2, pp. 83–90, 2017, doi: 10.34010/komputa.v6i2.2481.

U. Somani, K. Lakhani, and M. Mundra, “Implementing digital signature with RSA encryption algorithm to enhance the data security of cloud in cloud computing,” 2010 1st Int. Conf. Parallel, Distrib. Grid Comput. PDGC - 2010, pp. 211–216, 2010, doi: 10.1109/PDGC.2010.5679895.

F. J. Aufa, Endroyono, and A. Affandi, “Security System Analysis in Combination Method: RSA Encryption and Digital Signature Algorithm,” Proc. - 2018 4th Int. Conf. Sci. Technol. ICST 2018, pp. 3–7, 2018, doi: 10.1109/ICSTC.2018.8528584.

S. Gupta, N. Goyal, and K. Aggarwal, “A Review of Comparative Study of MD5 and SSH Security Algorithm,” Int. J. Comput. Appl., vol. 104, no. 14, pp. 1–4, 2014, doi: 10.5120/18267-9305.

P. Walia and V. Thapar, “Implementation of new modified MD5-512 bit algorithm for cryptography,” Int. J. Innov. Res. Adv. Eng., vol. 1, no. 6, pp. 2349–2163, 2014, [Online]. Available: http://ijirae.com/images/downloads/vol1issue6/JYCS10080.13.pdf.

I. A. Landge and H. Satopay, “Secured IoT through hashing using MD5,” Proc. 4th IEEE Int. Conf. Adv. Electr. Electron. Information, Commun. Bio-Informatics, AEEICB 2018, pp. 1–5, 2018, doi: 10.1109/AEEICB.2018.8481007.

T. Horsten explained the size limits on raw encryption. Here are two functions to encrypt/decrypt larger data when you can't use the envelope functions:

function ssl_encrypt($source,$type,$key){
//Assumes 1024 bit key and encrypts in chunks.

$maxlength=117;
$output='';
while($source){
  $input= substr($source,0,$maxlength);
  $source=substr($source,$maxlength);
  if($type=='private'){
    $ok= openssl_private_encrypt($input,$encrypted,$key);
  }else{
    $ok= openssl_public_encrypt($input,$encrypted,$key);
  }

  $output.=$encrypted;
}
return $output;
}

function ssl_decrypt($source,$type,$key){
// The raw PHP decryption functions appear to work
// on 128 Byte chunks. So this decrypts long text
// encrypted with ssl_encrypt().

$maxlength=128;
$output='';
while($source){
  $input= substr($source,0,$maxlength);
  $source=substr($source,$maxlength);
  if($type=='private'){
    $ok= openssl_private_decrypt($input,$out,$key);
  }else{
    $ok= openssl_public_decrypt($input,$out,$key);
  }

  $output.=$out;
}
return $output;

}

References


Andri, Yuli M. 2009. Implementasi Algoritma DES,RSA, dan Algoritma Kompresi

LZW Pada Berkas Digital. Skripsi. USU. Dipublikasikan.

Arazi, T. (n.d) Penggunaan Teori Bilangan pada Algoritma RSA, Protokol DiffieHe

llman, dan Pencegahan Terhadap Timing Attacks Online. Available at

http://www.mail.informatika.org/renaldi/Matdis/2006-2007/Makalah/Makalah0607-

pdf. [accessed 19/03/09].

Azis, M. F. 2005. Object Oriented Programming dengan PHP 5. Jakarta : Elex

Media Komputindo.

Basis Data. http://id.wikipedia.org/wiki/Basis_data

Fathansyah. 2004. Buku Teks Komputer Sistem Basis Data. Bandung : Informatika.

Hariyanto, B. 2004. Sistem Manajemen Basis Data. Bandung : Informatika. Kadir, A.

Konsep dan Tuntunan Praktis Basis Data. Yogyakarta : Andi. Kadir, A. 1999. Penuntun

Praktis Belajar SQL. Yogyakarta : Andi.

Kadir, A. 1999. Tuntunan Praktis Belajar Database Menggunakan MySQL. Yogyakarta :

Andi.

Munir, Rinaldi. 2005. Matematika Diskrit. Bandung : Informatika.

Munir, Rinaldi. 2006. Kriptografi. Bandung : Informatika.

Nugroho, Bunafit. 2004. Aplikasi Pemrograman Web Dinamis dengan PHP dan

MySQL. Yogyakarta : Gava Media.

Rahardjo, B. 1998. Keamanan Sistem Informasi Berbasis Internet. Bandung : PT.

Insan Ifonesia.

Riyanto, Djalal. 2004. Buku Ajar Basis Data. Semarang : Universitas Diponegoro.

RSA. http://id.wikipedia.org/wiki/RSA

Wahana Komputer. 2003. Memahami Model Enkripsi dan Security Data. Yogyakarta:

Andi Offset.