Installasi OpenBSD
Langkah-langkah Instalasi OpenBSD
rootdev=0×1100 rrootdev=0×2f00 rawdev=0×2f02 erase ^?, werase ^W, kill ^U, intr ^C, status ^T (I)nstall, (U)pgrade or (S)hell? i
Pilih I untuk instalasi OpenBSD
Setelah itu akan tampil :
Welcome to the OpenBSD/i386 3.8 install program. This program will help you install OpenBSD in a simple and rational way. At any prompt except password prompts you can run a shell command by typing ‘!foo’, or escape to a shell by typing ‘!’. Default answers are shown in []’s and are selected by pressing RETURN. At any time you can exit this program by pressing Control-C and then RETURN, but quitting during an install can leave your system in an inconsistent state. Specify terminal type: [vt220] Enter kbd(8) mapping? (’?’ for list) [none] Enter
Tekan Enter untuk pemilihan default terminal typenya
IS YOUR DATA BACKED UP? As with anything that modifies disk contents, this program can cause SIGNIFICANT data loss. It is often helpful to have the installation notes handy. For complex disk configurations, relevant disk hardware manuals and a calculator are useful. Proceed with install? [no] y
Ketikkan”y” ato “yes” untuk melanjutkan ke proses instalasi
Cool! Let’s get to it… You will now initialize the disk(s) that OpenBSD will use. To enable all available security features you should configure the disk(s) to allow the creation of separate filesystems for /, /tmp, /var, /usr, and /home. Available disks are: wd0. Which one is the root disk? (or done) [wd0] Enter
Pemilihan Hardisk yang akan di install OpenBSD, lanjutkan dengan menekan Enter
Do you want to use *all* of wd0 for OpenBSD? [no] yes
Ketikkan “yes” untuk menggunakan seluruh resource dari Hardisk yg ada.
> p m device: /dev/rwd0c type: ESDI disk: ESDI/IDE disk label: ST320011A bytes/sector: 512 sectors/track: 63 tracks/cylinder: 16 sectors/cylinder: 1008 cylinders: 16383 total sectors: 39102336 free sectors: 36030960 rpm: 3600 16 partitions: # size offset fstype [fsize bsize cpg] a: 17593.2M 1498.7M unused 0 0 c: 19092.9M 0.0M unused 0 0 i: 1498.7M 0.0M MSDOS > d a > a a offset: [3069360] Enter size: [36030960] 150m Rounding to nearest cylinder: 307440 FS type: [4.2BSD] Enter mount point: [none] / > a b offset: [3376800] Enter size: [35723520] 300m Rounding to nearest cylinder: 614880 FS type: [swap] Enter > a d offset: [3991680] Enter size: [35108640] 120m Rounding to nearest cylinder: 245952 FS type: [4.2BSD] Enter mount point: [none] /tmp > a e offset: [4237632] Enter size: [34862688] 80m Rounding to nearest cylinder: 164304 FS type: [4.2BSD] Enter mount point: [none] /var > a g offset: [4401936] Enter size: [34698384] 3g Rounding to nearest cylinder: 6291936 FS type: [4.2BSD] Enter mount point: [none] /usr > a h offset: [10693872] Enter size: [28406448] 4g Rounding to nearest cylinder: 8388576 FS type: [4.2BSD] Enter mount point: [none] /home > p m device: /dev/rwd0c type: ESDI disk: ESDI/IDE disk label: ST320011A bytes/sector: 512 sectors/track: 63 tracks/cylinder: 16 sectors/cylinder: 1008 cylinders: 16383 total sectors: 39102336 free sectors: 22115520 rpm: 3600 16 partitions: # size offset fstype [fsize bsize cpg] a: 150.1M 1498.7M 4.2BSD 2048 16384 16 # / b: 300.2M 1648.8M swap c: 19092.9M 0.0M unused 0 0 d: 120.1M 1949.1M 4.2BSD 2048 16384 16 # /tmp e: 80.2M 2069.2M 4.2BSD 2048 16384 16 # /var g: 2048.0M 2149.4M 4.2BSD 2048 16384 16 # /usr h: 4096.0M 4197.4M 4.2BSD 2048 16384 16 # /home i: 1498.7M 0.0M MSDOS > q Write new label?: [y] Enter
lanjut ke dalam penentuan partisi, yang saya pakai standar instalasi sesuai dengan yang ada di site openBSD
Mount point for wd0d (size=122976k)? (or ‘none’ or ‘done’) [/tmp] Enter
Mount point for wd0e (size=82152k)? (or ‘none’ or ‘done’) [/var] Enter
Mount point for wd0g (size=3145968k)? (or ‘none’ or ‘done’) [/usr] Enter
Mount point for wd0h (size=4194288k)? (or ‘none’ or ‘done’) [/home] Enter
Mount point for wd0d (size=122976k)? (or ‘none’ or ‘done’) [/tmp] done No more disks to initialize. OpenBSD filesystems: wd0a / wd0d /tmp wd0e /var wd0g /usr wd0h /home The next step *DESTROYS* all existing data on these partitions! Are you really sure that you’re ready to proceed? [no] y /dev/rwd0a: 307440 sectors in 305 cylinders of 16 tracks, 63 sectors
150.1MB in 1 cyl groups (306 c/g, 150.61MB/g, 19328 i/g) /dev/rwd0d: 245952 sectors in 244 cylinders of 16 tracks, 63 sectors
120.1MB in 1 cyl groups (244 c/g, 120.09MB/g, 15360 i/g) /dev/rwd0e: 164304 sectors in 163 cylinders of 16 tracks, 63 sectors
80.2MB in 1 cyl groups (164 c/g, 80.72MB/g, 10368 i/g) /dev/rwd0g: 6291936 sectors in 6242 cylinders of 16 tracks, 63 sectors
3072.2MB in 20 cyl groups (328 c/g, 161.44MB/g, 20608 i/g) /dev/rwd0h: 8388576 sectors in 8322 cylinders of 16 tracks, 63 sectors
4096.0MB in 26 cyl groups (328 c/g, 161.44MB/g, 20608 i/g) /dev/wd0a on /mnt type ffs (rw, asynchronous, local, ctime=Thu Oct 20 00:03:14 20
05) /dev/wd0h on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid, ctime=T
hu Oct 20 00:03:14 2005) /dev/wd0d on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Th
u Oct 20 00:03:15 2005) /dev/wd0g on /mnt/usr type ffs (rw, asynchronous, local, nodev, ctime=Thu Oct 20
00:03:15 2005) /dev/wd0e on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Th
u Oct 20 00:03:15 2005)
dan lanjut ke proses format atau menentukan mount point yang akan di gunakan setelah pengalokasian partisi tersebut. Setelah proses tersebut selesai maka akan berlanjut ke penentuan hostname yang akan digunakan oleh komputer tersebut.
Enter system hostname (short form, e.g. ‘foo’): serperBSD
lalu berlanjut ke seting up network yang akan di gunakan, seperti tampilan di bawah ini :
Configure the network? [yes] Enter
Available interfaces are: fxp0.
Which one do you wish to initialize? (or ‘done’) [fxp0] Enter
Symbolic (host) name for fxp0? [serperBSD] Enter
The default media for fxp0 is
media: Ethernet autoselect (100baseTX full-duplex)
Do you want to change the default media? [no] Enter
IP address for fxp0? (or ‘dhcp’) 192.168.0.251
Netmask? [255.255.255.0] Enter
IPv6 address for fxp0? (or ‘rtsol’ or ‘none’) [none]
No more interfaces to initialize.
DNS domain name? (e.g. ‘bar.com’) [my.domain] serperBSD.com
DNS nameserver? (IP address or ‘none’) [none] 202.134.0.155
Use the nameserver now? [yes] Enter
Default route? (IP address, ‘dhcp’ or ‘none’) 192.168.0.101
add net default: gateway 192.168.0.101 Edit hosts with ed? [no] Enter
Do you want to do any manual network configuration? [no] Enter
dan berlanjut ke proses menge-set password root di komputer tersebut.
Password for root account? (will not echo) pAssWOrd
Password for root account? (again) pAssWOrd
berlanjut ke pemilihan media instalasi, berhubung kita memiliki CD OpenBSD maka kita akan melanjutkan proses instalasi tersebut dengan pilihan media instalasinya adalah cdrom
Let’s install the sets! Location of sets? (cd disk ftp http or ‘done’) [cd] Enter Available CD-ROMs are: cd0.
Available CD-ROMs are: cd0. Which one contains the install media? (or ‘done’) [cd0] Enter
Pathname to the sets? (or ‘done’) [3.8/i386] Enter
dan berlanjut ke pemilihan file-set yang akan di install kedalam system tersebut, di dalam proses ini saya akan install semua file-set yang tersedia.
The following sets are available. Enter a filename, ‘all’ to select all the sets, or ‘done’. You may de-select a set by prepending a ‘-’ to its name. [X] bsd [X] bsd.rd [ ] bsd.mp [X] base38.tgz [X] etc38.tgz [X] misc38.tgz [X] comp38.tgz [X] man38.tgz [X] game38.tgz [ ] xbase38.tgz [ ] xetc38.tgz [ ] xshare38.tgz [ ] xfont38.tgz [ ] xserv38.tgz File Name? (or ‘done’) [bsd.mp] all The following sets are available. Enter a filename, ‘all’ to select all the sets, or ‘done’. You may de-select a set by prepending a ‘-’ to its name. [X] bsd [X] bsd.rd [X] bsd.mp [X] base38.tgz [X] etc38.tgz [X] misc38.tgz [X] comp38.tgz [X] man38.tgz [X] game38.tgz [X] xbase38.tgz [X] xetc38.tgz [X] xshare38.tgz [X] xfont38.tgz [X] xserv38.tgz
dan setelah itu akan tampil proses instalasi seperti di bawah ini.
File Name? (or ‘done’) [done] Enter
Ready to install sets? [yes] Enter
Getting bsd …
100% |**************************************************| 5157 KB 00:08
Getting bsd.rd …
100% |**************************************************| 4549 KB 00:02
Getting bsd.mp …
100% |**************************************************| 5202 KB 00:03
Getting base38.tgz …
100% |**************************************************| 35928 KB 00:25
Getting etc38.tgz …
100% |**************************************************| 1123 KB 00:01
Getting misc38.tgz …
100% |**************************************************| 2222 KB 00:01
Getting comp38.tgz …
100% |**************************************************| 20522 KB 00:17
Getting man38.tgz …
100% |**************************************************| 7234 KB 00:05
Getting game38.tgz …
100% |**************************************************| 2538 KB 00:01
Getting xbase38.tgz …
100% |**************************************************| 10225 KB 00:07
Getting xetc38.tgz …
100% |**************************************************| 93384 00:00
Getting xshare38.tgz …
100% |**************************************************| 1986 KB 00:02
Getting xfont38.tgz …
100% |**************************************************| 32438 KB 00:23
Getting xserv38.tgz …
100% |**************************************************| 18172 KB 00:14
Location of sets? (cd disk ftp http or ‘done’) [done] Enter
kemudian lanjut ke proses finishing dari instalasi tersebut :
Start sshd(8) by default? [yes] y
Start ntpd(8) by default? [no] y
Do you expect to run the X Window System? [yes] y
Change the default console to com0? [no] Enter
Saving configuration files……done. Generating initial host.random file ……done. What timezone are you in? (’?’ for list) [Canada/Mountain] ? Africa/ Chile/ GB-Eire Israel NZ-CHAT Turkey America/ Cuba GMT Jamaica Navajo UCT Antarctica/ EET GMT+0 Japan PRC US/ Arctic/ EST GMT-0 Kwajalein PST8PDT UTC Asia/ EST5EDT GMT0 Libya Pacific/ Universal Atlantic/ Egypt Greenwich MET Poland W-SU Australia/ Eire HST MST Portugal WET Brazil/ Etc/ Hongkong MST7MDT ROC Zulu CET Europe/ Iceland Mexico/ ROK posix/ CST6CDT Factory Indian/ Mideast/ Singapore posixrules Canada/ GB Iran NZ SystemV/ right/ What timezone are you in? (’?’ for list) [Canada/Mountain] Asia/Jakarta
Setting local timezone to ‘Asia/Jakarta’…done.
Making all device nodes…done. Installing boot block… boot: /mnt/boot proto: /usr/mdec/biosboot device: /dev/rwd0c /usr/mdec/biosboot: entry point 0 proto bootblock size 512 /mnt/boot is 3 blocks x 16384 bytes fs block shift 2; part offset 3069360; inode block 152, offset 4136 using MBR partition 1: type 166 (0xa6) offset 3069360 (0×2ed5b0) done. CONGRATULATIONS! Your OpenBSD install has been successfully completed! To boot the new system, enter halt at the command prompt. Once the system has halted, reset the machine and boot from the disk. # halt syncing disks… done The operating system has halted. Please press any key to reboot.
Membuat ISO OpenBSD
Pada umumnya beberapa Operating System terdistribusi dengan menggunakan iso, tapi tidak sama halnya dengan OpenBSD. Dalam artikel ini saya akan menuliskan langkah-langkah dalam pembuatan iso dari OpenBSD :
- Buat direktory pada mesin windows, misal OpenBSD/4.0/i386
- Download semua file2 yang ada di dalam ftp://ftp.openbsd.org/pub/OpenBSD/4.0/i386 dan taruh pada direktori yang telah di buat, jangan lupa untuk mendownload juga file src.tar.gz, sys.tar.gz, dan port.tar.gz.
- Setelah semua sudah terdownload kita buat iso dari file2 tersebut dengan menggunakan program mkisofs yang bisa di download di http://cdrecord.berlios.de/old/private/cdrecord.html dengan menggunakan perintah sebagai berikut :
# mkisofs -v -r -T -J -V "OpenBSD-4.0" -b 4.0/i386/cdrom40.fs -c boot.catalog -o /home/hky/OpenBSD/OpenBSD-40.iso -x /home/hky/OpenBSD/OpenBSD-40.iso /home/hky/OpenBSD/
- Tunggu sampai proses pembuatan iso selesai, setelah selesai barulah iso OpenBSD siap untuk di burning ke dalam CD Installer.
MetoDe ViGeneRe
Tehnik kriptografi berikutnya yang dapat diperkenalkan kepada para pemula, anak-anak Pramuka Penggalang ataupun sebagai permainan saat boot champ adalah sistem sandi Vigenère.
Sistem sandi ini pertama kali dipopulerkan oleh Blaise de Vigenère seorang diplomat Perancis pada abad 15, sehingga disebutlah metode ini dengan sistem sandi Vigenère
Sistem sandi ini pertama kali dipopulerkan oleh Blaise de Vigenère seorang diplomat Perancis pada abad 15, sehingga disebutlah metode ini dengan sistem sandi Vigenère
Sistem sandi Vigenère adalah sistem sandi substitusi multi-alfabet, yaitu sistem sandi Caesar tetapi dengan pergeseran alfabet yang berlainan disesuaikan dengan kata kuncinya.
Yang dimaksud sistem sandi substitusi adalah menyandi dengan cara mengganti huruf-huruf pesan/teks aslinya dengan huruf-huruf sandi. Sistem sandi Caesar dan Viginère termasuk metode sistem sandi ini. Bahkan sistem sandi substitusi merupakan sistem sandi yang dipakai pula dalam kriptografi modern, dengan variasi-variasi yang terus berkembang.
contoh :
kata kunci : MERAPI
pesan asli : SUKSES ADALAH PERMAINAN PIKIRAN
alfabet biasa :
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
alfabet sistem sandi Vigenère dengan kata kunci MERAPI :
M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
R S T U V W X Y Z A B C D E F G H I J K L M N O P Q
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
sehingga
S dengan pergeseran M = E; U dengan pergeseran E = Y; K dengan pergeseran R = B; S dengan pergeseran A = S; E dengan pergeseran P = T; S dengan pergeseran I = A; A dengan pergeseran M = M; D dengan pergeseran E = H; dsb….. sampai N dengan pergeseran A = N
pesan tersandi : EYBSTA MHRLPP BIIMPQZEE PXSUVRN
JaVa Crypto
/*
* Created on Apr 5, 2005
*/
package kripto;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.security.cert.Certificate;
import java.security.cert.CertificateFactory;
import java.security.Key;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.cert.CertificateException;
import java.nio.charset.Charset;
import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.CipherOutputStream;
/**
* @author bangamri
*/
public class Asimetrik {
private static void pembangkitanPasanganKunci(String alias, String namaDepan, String namaBelakang, String unit, String organisasi, String negara, String passwordKunci, String keyStore) {
try{
String perintah=”E://jdk1.5.0/bin/keytool -genkey -alias “+alias+” -keyalg RSA -dname \”cn=”+namaDepan+” “+namaBelakang+”, ou=”+unit+”, o=”+organisasi+”, c=”+negara+”\” -keysize 1024 -keypass “+passwordKunci+” -keystore “+keyStore+” -storepass Ultimate10″;
System.out.println(perintah);
Process proses=Runtime.getRuntime().exec(perintah);
proses.waitFor();
KeyStore ks=KeyStore.getInstance(“JKS”);
FileInputStream is=new FileInputStream(“KeyStore.jks”);
ks.load(is,new String(“Ultimate10″).toCharArray());
Certificate cert=ks.getCertificate(alias);
byte[] buffer=cert.getEncoded();
FileOutputStream os=new FileOutputStream(alias+”.crt”);
Writer wr = new OutputStreamWriter(os, Charset.forName(“UTF-8″));
wr.write(“—–BEGIN CERTIFICATE—–\n”);
wr.write(new sun.misc.BASE64Encoder().encode(buffer));
wr.write(“\n—–END CERTIFICATE—–\n”);
wr.flush();
os.close();
}catch(IOException e){
}catch(InterruptedException e){
}catch(CertificateException e){
}catch(KeyStoreException e){
}catch(NoSuchAlgorithmException e){
}finally{
System.out.println(“Pembangkitan kunci berhasil.”);
}
}
private static void enkrip(String alias, String fileSertifikat, String filePlain, String fileCipher) {
try{
FileInputStream is=new FileInputStream(fileSertifikat);
CertificateFactory cf=CertificateFactory.getInstance(“X.509″);
Certificate cert=cf.generateCertificate(is);
PublicKey pub=cert.getPublicKey();
File pla=new File(filePlain);
File cip=new File(fileCipher);
Cipher enkripsi=Cipher.getInstance(“RSA”);
enkripsi.init(Cipher.ENCRYPT_MODE,pub);
InputStream isPla=new FileInputStream(pla);
OutputStream osCip=new FileOutputStream(cip);
osCip=new CipherOutputStream(osCip,enkripsi);
byte[] buffer=new byte[1024];
int n=0;
while((n=isPla.read(buffer))>=0) {
osCip.write(buffer,0,n);
}
osCip.close();
isPla.close();
}catch(Exception e){
System.out.println(e);
}finally{
System.out.println(“Enkripsi sukses”);
}
}
private static void dekrip(String alias, String fileKeystore, String fileCipher, String filePlain) {
try {
FileInputStream is=new FileInputStream(fileKeystore);
KeyStore ks=KeyStore.getInstance(“JKS”);
ks.load(is, new String(“Ultimate10″).toCharArray());
Key kunci=ks.getKey(alias,new String(“Ultimate10″).toCharArray());
PrivateKey priv=(PrivateKey)kunci;
File fileCip=new File(fileCipher);
File filePla=new File(filePlain);
Cipher dekripsi=Cipher.getInstance(“RSA”);
dekripsi.init(Cipher.DECRYPT_MODE,priv);
InputStream isCip=new FileInputStream(fileCip);
OutputStream osPla=new FileOutputStream(filePla);
isCip=new CipherInputStream(isCip,dekripsi);
byte[] buffer=new byte[1024];
int n=0;
while ((n=isCip.read(buffer))>=0) {
osPla.write(buffer,0,n);
}
isCip.close();
osPla.close();
}catch(Exception e) {
System.out.println(e);
}finally{
System.out.println(“Dekripsi sukses”);
}
}
public static void main(String[] args) {
//pembangkitanPasanganKunci(“alice”,”Alice”,”Silverstone”,”Espionage”,”CIA”,”US”,
“Ultimate10″,”KeyStore.jks”);
enkrip(“alice”,”alice.crt”,”pesan.txt”,”pesan.enc”);
dekrip(“alice”,”KeyStore.jks”,”pesan.enc”,”pesan2.txt”);
}
}
taken from : javatingkir.blogspot.com
Cryptographic Algorithms
There are of course a wide range of cryptographic algorithms in use. The following are amongst the most well known:
DES
This is the ‘Data Encryption Standard’. This is a cipher that operates on 64-bit blocks of data, using a 56-bit key. It is a ‘private key’ system. Further Details on the DES Algorithm
RSA
RSA is a public-key system designed by Rivest, Shamir, and Adleman. Further Details on the RSA Algorithm
HASH
A ‘hash algorithm’ is used for computing a condensed representation of a fixed length message/file. This is sometimes known as a ‘message digest’, or a ‘fingerprint’..
MD5
MD5 is a 128 bit message digest function. It was developed by Ron Rivest. Further Details on the MD5 Algorithm
AES
This is the Advanced Encryption Standard (using the Rijndael block cipher) approved by NIST.
SHA-1
SHA-1 is a hashing algorithm similar in structure to MD5, but producing a digest of 160 bits (20 bytes).Because of the large digest size, it is less likely that two different messages will have the same SHA-1 message digest. For this reason SHA-1 is recommended in preference to MD5.
HMAC
HMAC is a hashing method that uses a key in conjunction with an algorithm such as MD5 or SHA-1. Thus one can refer to HMAC-MD5 and HMAC-SHA1.
taken from : http://www.cryptographyworld.com/algo.htm
