Академический Документы
Профессиональный Документы
Культура Документы
Branch: I.T.
Title: PASS@EMD-IN-JPG
Page No: 1
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
PASS@EMD-IN-JPG
Conventionally,
alphanumeric
text
passwords
are
used
for
user
authentication. However, it is challenging for users to remember long complicated passwords, while short simple passwords are too weak to resist attackers and are therefore a security risk. Such disadvantage of alphanumeric passwords seems to put users in dilemma.In the proposed system we have come up with an unique way by using which the security can be provided in a most unique and efficient way. Here a user can provide a password based on an image that he chooses. Here the password will be attached with to the image that he chooses. All the images will be stored in an image pool that will be maintained by the administrator. The image will be cropped into small images based on a function that the user can choose from a number of functions that will be provided. After the cropping of the image the jumbling of the cropped images take place based on the function that the user has chosen and after the jumbling the password will be attached with the image. Now in order to retrieve the password the user will have to know the image and the function based on which the entire process was performed. We can also provide a level of security on the basis that the data that is attached could be encrypted before it will be attached to the image. The selected images can be dragged and added into a grid and used for further processing. In this way we can provide security to the password that will be securely guarded by our layers of security.
Page No: 2
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
TABLE OF CONTENTS
1. INTRODUCTION 2. LITERATURE SURVEY 3. PASS@EMD-IN-JPG 4 6 9 10 14 18 19 21 24 40 41 44 44 45
ANALYSIS
5. PASS@EMD-IN-JPG DESIGN
5.1. Module explanation 5.2. Logical system design 5.3. Physical system design
6. PASS@EMD-IN-JPG IMPLEMENTATION
6.1. Implementation details
7. PASS@EMD-IN-JPG TESTING
7.1. Unit testing 7.2. Integration testing
8. CONCLUSION
8.1. Summary 8.2. Future Scope
47
Page No: 3
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Page No: 4
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
1.INTRODUCTION
Nowadays, alphanumeric passwords are mostly used for computer and network authentication. Most people tend to choose simple text passwords. However, such passwords are not strong enough to resist attackers. Therefore, the study of graphical passwords is increasing and draws much attention from many researchers. The existing graphical pass word techniques can be divided into three general categories: pass-images recognition, action sequence repetition and drawing reproduction. All of these have the same internal representation if their coordinates are not taken into account. Our proposed system is way different and surpasses all limitations and similarities of the previous methods. In the proposed system we have come up with an unique way by using which the security can be provided in a most unique and efficient way. Our proposed system is a web based application. Here a user can provide a password based on an image that he chooses. Here the password will be attached with to the image that he chooses. All the images will be stored in an image pool that will be maintained by the administrator. The image will be cropped into small images based on a function that the user can choose from a number of functions that will be provided. After the cropping of the image the jumbling of the cropped images take place based on the function that the user has chosen and after the jumbling the password will be attached with the image. Now in order to retrieve the password the user will have to know the image and the function based on which the entire process was performed. We can also provide a level of security on the basis that the data that is attached could be encrypted before it will be attached to the image. In this way we can provide security to the password that will be securely guarded by our layers of security.
Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 5
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Page No: 6
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
2.LITERATURE SURVEY
Conventionally,
alphanumeric
text
passwords
are
used
for
user
authentication. However, it is challenging for users to remember long complicated passwords, while short simple passwords are too weak to resist attackers and are therefore a security risk. Such disadvantages of alphanumeric password seem to put users in dilemma. Psychologists have shown that with both recognition and recall tasks, images are more memorable than words or sentences. This is encouraging in terms of memory for graphical passwords. The existing graphical password techniques can be divided into three general categories: recognizing the pass-images, repeating a sequence of actions and reproducing a drawing. Draw-A-Secret (DAS) is a representative reproducing a drawing scheme which is of particular interest and worthy of extensive study. The property of alphabet independence liberates users from remembering any text password and makes the scheme accessible to speakers of any language. Background Draw-A-Secret (BDAS) provides a significant extension to the security and usability of the DAS scheme by introducing background images. The background images can encourage users to set strong passwords and thus enhance memorability. Qualitative Draw-A-Secret (QDAS) also extends the ideas pioneered within DAS. The use of qualitative spatial relations relaxes the tight constraints on the reconstruction of a secret, allowing a range of deviations from the original. In DAS based schemes, the user password is a free-form drawing produced on an NN grid, typically a 55 grid. There are many restrictions on drawing such as keeping every stroke off the grid lines and ensuring redrawing in the exact position, which make it difficult for the user himself to recall the secret
Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 7
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
In our proposed system user can provide a password based on an image that he chooses. Here the password will be attached with to the image that he chooses. All the images will be stored in an image pool that will be maintained by the administrator. The image will be cropped into small images based on a function that the user can choose from a number of functions that will be provided. After the cropping of the image the jumbling of the cropped images take place based on the function that the user has chosen and after the jumbling the password will be attached with the image. In this way we can provide security for the password. Data is secured by using RSA algorithm. Here we are implementing the client server architecture. A messaging system has to be created in order to send the message. The image server that sends the image to the user in which the message is embedded is implemented. The image that has been encrypted with the message is decrypted by the user on the other side.
Page No: 8
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Page No: 9
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Some of the specialties of our new system PASS@EMD-IN-JPG compared to old systems are:
Security can be provided in a most unique and efficient way. The data attached could be encrypted before it will be attached to the image. Data can be transferred in a hidden and secure manner.
This document contains details of the project that has to be implemented using C# language and a database. The project is PASS@EMD-IN-JPG system used to hide data behind an image.
Page No: 10
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Sl. No 1. 2. 3. 4.
Module
Registration Image upload Manipulation File transfer
Status
To be Implemented To be Implemented To be Implemented To be Implemented
3.1.1. Registration.
Every new user has to register. Has to select image in which password must be attached. Include details like name,address,email-id,password . Must specify algorithm to jumble image ie.row swap,column swap,transpose etc.
Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 11
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
3.1.2.Image Upload.
The uploaded image is stored in 768*768 size format. The image is cropped into 128*36 size format. The RGB bit of image is used to attach password to the image.
3.1.3.Manipulation.
Image will be cropped into small images based on a function. After cropping the jumbling of the cropped images take place. After jumbling the password will be attached with the image.
3.2 Forms:
The different forms of our project is as follows: i.LOGIN The registered users can login directly.
Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 12
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
ii.REGISTRATION Every new user has to register by including details like username,password etc. iii.FILE TRANSFER . For transferring files between two registered users. iv.USER MANAGEMENT. For admin to manage the users and to upload files.
Page No: 13
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
4.1.2. ASP.NET
ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites, web applications and web services. It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (CLR), allowing
Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 14
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
programmers to write ASP.NET code using any supported .NET language. The ASP.NET SOAP extension framework allows ASP.NET components to process SOAP messages. The latest version is ASP.NET 4.0, as part of .NET Framework 4.0
4.1.3. IIS
Internet Information Services (IIS) formerly called Internet Information Server is a web server application and set of feature extension modules created by Microsoft for use with Microsoft Windows. IIS 7.5 is the latest version from the IIS family.
Page No: 15
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
4.1.5. Database
Microsoft SQL Server is a relational model database server produced by Microsoft. Its primary query languages are T-SQL and ANSI SQL. Latest version is Sql Server 2005.
Microsoft SQL Server 2005 or Higher IIS 6 or higher Microsoft Visual Studio 2008 or Higher CSC (Microsoft C-Sharp Compiler)
Page No: 16
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Page No: 17
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
5.PASS@EMD-IN-JPG DESIGN
PASS@EMD-IN-JPG, here the architecture, components, modules, interfaces and data for PASS@EMD-IN-JPG is defined to satisfy the specified requirements.
5.1 MODULES
The different modules in PASS@EMD-IN-JPG are:
1. Registration 2. Image Upload 3. Manipulation 4. File Transfer
5.1.1. Registration.
Every new user has to register. Has to select image in which password must be attached.Include details like name,address,email-id,username, password .Must specify algorithm to jumble image ie.row swap,column swap,transpose etc.
Page No: 18
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
The uploaded image is stored in 768*768 size format.The image is cropped into 128*36 size format.The RGB bit of image is used to attach password to the image.
5.1.3. Manipulation. Image will be cropped into small images based on a function.After cropping the jumbling of the cropped images take place. After jumbling the password will be attached with the image.
Page No: 19
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
are called use cases. The use case diagram shows which actors interact with each use cases.
login
User management
Upload image
File transfer
Registration
Page No: 20
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
admin
user
The user can register and with the registered password user can login to transfer files.The admin can upload images to which password and files are to be attached and also has a relative idea about the users registered.
size 50
Page 50 No: 21
Filename
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
The table contains the receiver of the file and file name.
b.Upload image
column name Imageid Imgfname data type Int Varchar size 8 50
c.User registration
Column name data type size
50 50 50 50 50 8 50 50 50
The registration includes registration details like username,password, and also must specify the algorithm to swap the pictures.
Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 22
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Page No: 23
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Page No: 24
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
6. IMPLEMENTATION DETAILS
6.1REGISTRATION
using using using using using using using using using using using using using using using System; System.Collections; System.Configuration; System.Data; System.Linq; System.Web; System.Web.Security; System.Web.UI; System.Web.UI.HtmlControls; System.Web.UI.WebControls; System.Web.UI.WebControls.WebParts; System.Xml.Linq; System.Drawing; System.IO; System.Threading;
public partial class register : System.Web.UI.Page { int count = 0; static string p = ""; dbaction db = new dbaction(); DataSet ds = new DataSet(); int i = 0; Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 25
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
protected void Page_Load(object sender, EventArgs e) { txtlname.Focus(); encydypt d= new encydypt(); if (!IsPostBack) { navigate(); string i= d.encrypt("hello"); } } protected void btnsubmit_Click(object sender, EventArgs e) { int count = 0; count = Convert.ToInt32(db.scalar("select count(*) from userregistration where username='" + txtusername.Text + "'")); if (count == 0) { for (int i = 1; i <= 36; i++) { FileInfo TheFile = new FileInfo(Server.MapPath("~\\Shuffle\\" + i + ".bmp")); if (TheFile.Exists) File.Delete(Server.MapPath("~\\Shuffle\\" + i + ".bmp")); } if (p != "") { Directory.CreateDirectory(Server.MapPath(@"~\splitimg\" + txtusername.Text)); Imagemanipulation m = new Imagemanipulation(); int[,] a = new int[,] { { 1, 2, 3, 4, 5, 6 }, { 7, 8, 9, 10, 11, 12 }, { 13, 14, 15, 16, 17, 18 }, { 19, 20, 21, 22, 23, 24 }, { 25, 26, 27, 28, 29, 30 }, { 31, 32, 33, 34, 35, 36 } }; int[,] b = new int[6, 6]; int j = 0; for (int i = 0; i < 6; i++) { for (j = 0; j < 6; j++) { split(j, i); } } switch (DropDownList1.SelectedIndex) { case 1: b = m.transpose(a); break; Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 26
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
case 2: b = m.row_swap(a); break; case 3: b = m.column_swap(a); break; case 4: b = m.row_column_swap(a); break; case 5: b = m.row_column_transpose(a); break; default: Response.Write("<script>alert('Illegal Choice')</script>"); break; } shufle(b); string str = txtpassword.Text.ToString(); char[] pa = str.ToCharArray(); int[] pas = new int[pa.Length + 1]; pas[0] = pa.Length;
Directory.CreateDirectory(Server.MapPath("~\\spilt\\" + txtusername.Text)); for (int i = 1; i <= b.Length; i++) { // string source = Server.MapPath(@"~\splitimg\" + txtusername.Text + "\\" + i + "\\" + ".png"); // Bitmap img1 = new Bitmap(Server.MapPath(p)); "\\" + i + ".bmp"); // string name = ("~\\splitimg\\" + txtusername.Text +
Bitmap source = new Bitmap(Server.MapPath("~\\shuffle\\" + i + ".bmp")); string nma1 = ("~\\spilt\\" + txtusername.Text + "\\" + i + ".bmp"); if (i <= pa.Length + 1) { if (i == 1) { saveima(source, nma1, pas[i - 1]); } else { pas[i - 1] = (int)pa[i - 2]; saveima(source, nma1, pas[i - 1]); } } else { saveima1(source, nma1); } } rejoin("~\\spilt\\" + txtusername.Text + "\\", b); Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 27
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
//for (int i = 0; i < 6; i++) //{ // for (int q=0; q < 6; q++) // { // File.Delete(Server.MapPath("~\\Shuffle\\" + txtusername.Text + "\\" + b[i, q] + ".bmp")); // } //} // File.Delete(Server.MapPath("~\\spilt\\" + txtusername.Text + ".bmp")); //Label2 .Text = db.execute("insert into userregistration values('" + txtfname.Text + "','" + txtlname.Text + "','" + txtaddress.Text + "','" + txtconnumber.Text + "','" + RadioButtonList1.SelectedItem.ToString() + "'," + Label2.Text + ",'" + txtusername.Text + "','" + txtemailid.Text + "','" + DropDownList1.SelectedItem.ToString() + "')"); //source.Save(Server.MapPath(@"~\splitimg\" + txtusername.Text + "\\" + i + ".bmp")); // source.Save(Server.MapPath("~\\split\\" + txtusername.Text + "\\" + i + ".bmp"));
Response.Redirect("Login.aspx"); } } else { Response.Write("<script>alert('User already exist')</script>");// string target = Server.MapPath(@"~\jumbled\" + txtusername.Text + "\\" + i +".bmp"); } }
protected void Button1_Click(object sender, EventArgs e) { for (int i = 1; i <= 36; i++) { FileInfo TheFile = new FileInfo(Server.MapPath("~\\Shuffle\\" + i + ".bmp")); if(TheFile.Exists ) File.Delete(Server.MapPath("~\\Shuffle\\" + i+ ".bmp")); } if (p != "") { Directory.CreateDirectory(Server.MapPath(@"~\splitimg\" + txtusername.Text)); Imagemanipulation m = new int[,] a = new int[,] { { 11, 12 }, { 13, 14, 15, 16, 17, 18 }, { 27, 28, 29, 30 }, { 31, 32, 33, 34, 35, int[,] b = new int[6, 6]; int j = 0; Imagemanipulation(); 1, 2, 3, 4, 5, 6 }, { 7, 8, 9, 10, 19, 20, 21, 22, 23, 24 }, { 25, 26, 36 } };
Page No: 28
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
for (int i = 0; i < 6; i++) { for (j = 0; j < 6; j++) { split(j, i); } } switch (DropDownList1.SelectedIndex) { case 1: b = m.transpose(a); break; case 2: b = m.row_swap(a); break; case 3: b = m.column_swap(a); break; case 4: b = m.row_column_swap(a); break; case 5: b = m.row_column_transpose(a); break; default: Response.Write("<script>alert('Illegal Choice')</script>"); break; } shufle(b); string str = txtpassword.Text.ToString(); char[] pa = str.ToCharArray(); int[] pas = new int[pa.Length + 1]; pas[0] = pa.Length; Directory.CreateDirectory(Server.MapPath("~\\spilt\\" + txtusername.Text)); for (int i = 1; i <= b.Length; i++) { // string source = Server.MapPath(@"~\splitimg\" + txtusername.Text + "\\" + i + "\\" + ".png"); // Bitmap img1 = new Bitmap(Server.MapPath(p)); // string name = ("~\\splitimg\\" + txtusername.Text + "\\" + i + ".bmp"); Bitmap source = new Bitmap(Server.MapPath("~\\shuffle\\" + i + ".bmp")); string nma1 = ("~\\spilt\\" + txtusername.Text + "\\" + i + ".bmp"); if (i <= pa.Length + 1) { if (i == 1) { saveima(source, nma1, pas[i - 1]); } else { pas[i - 1] = (int)pa[i - 2]; Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 29
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
saveima(source, nma1, pas[i - 1]);
} } else { } } rejoin("~\\spilt\\" + txtusername.Text + "\\", b); //for (int i = 0; i < 6; i++) //{ // for (int q=0; q < 6; q++) // { // File.Delete(Server.MapPath("~\\Shuffle\\" + txtusername.Text + "\\" + b[i, q] + ".bmp")); // } //} // File.Delete(Server.MapPath("~\\spilt\\" + txtusername.Text + ".bmp")); db.execute("insert into userregistration values('" + txtfname.Text + "','" + txtlname.Text + "','" + txtaddress.Text + "','" + txtconnumber.Text + "','" + RadioButtonList1.SelectedItem.ToString() + "'," + Label2.Text + ",'" + txtusername.Text + "','" + txtemailid.Text + "','" + DropDownList1.SelectedItem.ToString() + "')"); //source.Save(Server.MapPath(@"~\splitimg\" + txtusername.Text + "\\" + i + ".bmp")); // source.Save(Server.MapPath("~\\split\\" + txtusername.Text + "\\" + i + ".bmp")); Response.Redirect("Login.aspx"); } // string target = Server.MapPath(@"~\jumbled\" + txtusername.Text + "\\" + i +".bmp"); } public void shufle(int[,] b) { int k=0,q=0; //File.Delete (Server .MapPath ("~\\shuffle\\*.*")); Directory.CreateDirectory(Server.MapPath("~\\Shuffle\\")); for (i = 1; i <= 36; i++) { FileInfo TheFile = new FileInfo(Server.MapPath("~\\splitimg\\" + txtusername.Text + "\\" + i + ".bmp")); if (TheFile.Exists) { Toc H Institute of Science & Technology Arakkunnam 682 313
saveima1(source, nma1);
Page No: 30
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
File.Move((Server.MapPath("~\\splitimg\\" + txtusername.Text + "\\" + i + ".bmp")),(Server.MapPath("~\\Shuffle\\" b[k,q] + ".bmp"))); File.Delete(Server.MapPath("~\\splitimg\\" + txtusername.Text + "\\" + i + ".bmp")); } if (i % 6 == 0) { k++; q = 0; } else { q++; } } Thread.Sleep(300); Directory.Delete(Server.MapPath("~\\splitimg\\" + txtusername.Text)); } public void rejoin(string name,int[,] b) { Color c = new Color(); Bitmap imag2 = new Bitmap(768, 768); int w = 0,flag=0,h=0,flag2=0; for (int i = 1; i <= 36; i++) { Bitmap source = new Bitmap(Server.MapPath(name + ".bmp"));
+ b[flag,flag2]
for (int j = 0; j <=127; j++) { for(int k =0;k<=127;k++) { c = source.GetPixel(j, k); imag2.SetPixel(w,h, c); h++; } h = flag * 128; w++; } // File.Delete(Server.MapPath(name + b[flag, flag2] + ".bmp")); if (i % 6 == 0) { flag++; h = flag * 128; // h = 0; w = 0; flag2 = 0; } else { // h = 0; Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 31
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
flag2++; // w = (flag2) * 128-1; } } imag2.Save(Server.MapPath(@"~\joinimg\" + txtusername.Text + ".bmp")); } public void saveima(Bitmap img1,string file ,int pas) { Bitmap imag2 = new Bitmap(128, 128); int w = 0; for (int i = 0; i <=127 ; i++) { int h = 0; for (int k = 0; k <=127 ; k++) { Color c1 = img1.GetPixel(i, k); if (i == 0 && k == 0) { Color newColor = Color.FromArgb(pas, pas, pas); imag2.SetPixel(0, 0, newColor); } else { imag2.SetPixel(w, h, c1); } h++;
} count++; imag2.Save(Server.MapPath(file)); } public void saveima1(Bitmap img1, string file) { Bitmap imag2 = new Bitmap(128, 128); int w = 0; for (int i = 0; i <= 127; i++) { int h = 0; for (int k = 0; k <= 127; k++) { Color c1 = img1.GetPixel(i, k); imag2.SetPixel(w, h, c1); h++;
} w++;
} w++;
Page No: 32
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
imag2.Save(Server.MapPath(file)); } protected void imgbtn_Click(object sender, EventArgs e) { //ImageButton btn = (ImageButton)sender; //DataListItem row = (DataListItem )btn.NamingContainer; //p = btn.ImageUrl;
} public void split(int x, int y) { Bitmap img1 = new Bitmap(Server.MapPath(p)); // bitmap to be splitted Bitmap imag2 = new Bitmap(128, 128); int w = 0; for (int i = x * 128; i < x * 128 + 128; i++) { int h = 0; for (int k = y * 128; k < y * 128 + 128; k++) { Color c1 = img1.GetPixel(i, k); imag2.SetPixel(w, h, c1); h++;
} w++;
protected void dynamicdiv() { } public void test(object sender, ImageClickEventArgs e) { ImageButton ib = (ImageButton)sender; // Label2.Text = } public void navigate() { ds = db.dataBind("select img_fname from uploadimage", "abc"); GridView1.DataSource = ds; GridView1.DataMember = "abc"; Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 33
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
GridView1.DataBind(); } void loadimage(string s) { //for (int i = 1; i <= 3; i++) //{ // for (int j = 1; j <= 3; j++) // { // ImageButton im = new ImageButton(); // im.ImageUrl = s; // im.ID = i.ToString(); // im.Width = 50; // im.Height = 50; // im.Click += new ImageClickEventHandler(test); // Panel1.Controls.Add(im); // } // System.Web.UI.HtmlControls.HtmlGenericControl dynDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("DIV"); // Panel1.Controls.Add(dynDiv); //} } protected void imgbtn_Click(object sender, ImageClickEventArgs e) { ImageButton btn = (ImageButton)sender; // DataListItem row = (DataListItem)btn.NamingContainer; p = btn.ImageUrl; }
e)
} protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView1.PageIndex = e.NewPageIndex; navigate(); } protected void DatePicker1_SelectionChanged(object sender, EventArgs e) { DateTime dt = DateTime.Now.Date; DateTime sel=DatePicker1.SelectedDate.Date ; int t = dt.Year; int seld = sel.Year ; } } Label2.Text =(t-seld).ToString ();
Page No: 34
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Page No: 35
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
public string EncryptData(string data2Encrypt,int i) { AssignParameter(); StreamReader reader = new StreamReader(Server.MapPath("~\\keyval\\"+DropDownList1 .SelectedItem .ToString ()+i+"publickey.xml")); string publicOnlyKeyXML = reader.ReadToEnd(); rsa.FromXmlString(publicOnlyKeyXML); reader.Close(); //read plaintext, encrypt it to ciphertext byte[] plainbytes = System.Text.Encoding.UTF8.GetBytes(data2Encrypt); byte[] cipherbytes = rsa.Encrypt(plainbytes, false); return Convert.ToBase64String(cipherbytes); } public void AssignNewKey(int i) { AssignParameter(); //provide public and private RSA params StreamWriter writer = new StreamWriter(Server.MapPath("~\\keyval\\"+DropDownList1 .SelectedItem .ToString ()+i+"privatekey.xml")); string publicPrivateKeyXML = rsa.ToXmlString(true); writer.Write(publicPrivateKeyXML); writer.Close(); //provide public only RSA params writer = new StreamWriter(Server.MapPath("~\\keyval\\"+DropDownList1 .SelectedItem .ToString ()+i+"publickey.xml")); string publicOnlyKeyXML = rsa.ToXmlString(false); writer.Write(publicOnlyKeyXML); writer.Close(); } public string DecryptData(string data2Decrypt) { AssignParameter(); byte[] getpassword = Convert.FromBase64String(data2Decrypt); StreamReader reader = new StreamReader(Server.MapPath("~\\keyval\\" + filename + "privatekey.xml")); string publicPrivateKeyXML = reader.ReadToEnd(); rsa.FromXmlString(publicPrivateKeyXML); reader.Close(); //read ciphertext, decrypt it to plaintext byte[] plain = rsa.Decrypt(getpassword, false); return System.Text.Encoding.UTF8.GetString(plain); } protected void btnsend_Click(object sender, EventArgs e) { string username = Request.QueryString["user"].ToString(); Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 36
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
string qry = "select count(*) from tblfiletransfer where username='" + DropDownList1.SelectedItem.ToString() + "'"; int cn = Convert.ToInt32(db.scalar(qry)); if (cn == 0) { cn = 1; } else { cn++; } FileUpload1.SaveAs(Server.MapPath(@"~\" + FileUpload1.FileName)); FileStream fs = new FileStream(Server.MapPath(@"~\" + FileUpload1.FileName), FileMode.Open, FileAccess.Read); StreamReader sr = new StreamReader(fs); data = sr.ReadToEnd(); string[] str = FileUpload1.FileName.Split('.'); filename = str[0]; AssignNewKey(cn); string endata = EncryptData(data,cn); char[] cha = endata.ToCharArray(); int[] asc = new int[cha.Length]; for (int i = 0; i < endata.Length; i++) { asc[i] = (int)cha[i]; } Bitmap source = new Bitmap(Server.MapPath(path)); Bitmap img2 = new Bitmap(768, 768); Color c = new Color(); int h = 0; for (int i = 0; i < 768; i++) { for (int k = 0; k < 768; k++) { if (k % 64 == 0 && i % 32 == 0 && h < 172) { c = source.GetPixel(i, k); int b = (int)c.B; int g = (int)c.G; int r = asc[h]; Color newColor = Color.FromArgb(r, g, b); img2.SetPixel(i, k, newColor); h++; } else { } } }
string f = "~\\file\\" + DropDownList1 .SelectedItem .ToString () + cn + ".bmp"; Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 37
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
img2.Save(Server.MapPath(f)); qry = "insert into tblfiletransfer values('" + DropDownList1 .SelectedItem .ToString () + "','" + f + "')"; db.execute(qry); Response.Write("<script>alert('File Delivered')</script>"); } protected void imgfile_Click(object sender, EventArgs e) { ImageButton img = (ImageButton)sender; path = img.ImageUrl; } protected void imgpool_PageIndexChanged(object sender, EventArgs e) { } protected void imgpool_PageIndexChanging(object sender, GridViewPageEventArgs e) { imgpool.PageIndex = e.NewPageIndex; bind(); } void bind() { ds = db.dataBind("select img_fname from uploadimage", "src"); imgpool.DataSource = ds; imgpool.DataBind(); } protected void imgpool_SelectedIndexChanged(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { string username = Request.QueryString["user"].ToString(); Response .Redirect ("viewfiles.aspx?user="+username ); // filename = "1234"; // Bitmap source = new Bitmap(Server.MapPath("~//file//1234.bmp")); // int[] asc = new int[172]; // int h = 0; // char s; // string ddata = ""; // Color c = new Color(); // for (int i = 0; i < 768; i++) // { // for (int k = 0; k < 768; k++) // { // if (k % 64 == 0 && i % 32 == 0 && h < 172) // { // c = source.GetPixel(i, k);
Page No: 38
Semester: VI
// // // // // // //
Branch: I.T.
Title: PASS@EMD-IN-JPG
// // } }
Page No: 39
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
PASS@EMD-IN-JPG testing is a testing conducted on a complete, integrated system to evaluate the systems compliance with its specific requirement. System testing falls within the scope of black box testing.
TESTCASE NAME
Registration
Description
Entered Details to register
Expected output
On click on each button corresponding message must be displayed. File transfer page.
Output obtained
Registration Failed
Status
Failure
Login
File Transfer
Entered username and password after registration Transferring files File sent. an unregistered
Page obtained
Success
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
user.
File transfer
Expected Outpu output t obtain ed Registere Regist d ered successfu succe lly. ssfully but passw ord strengt h low. File sent File sent
Statu s Succe ss
Reason
No of characte rs less.
Succe ss
Existing user.
Page No: 41
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Page No: 42
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
8.CONCLUSION
The system has been developed and is found working effectively. The developed system is flexible and changes can be made easy as and when required. I tried to make the system maximum user friendly. Security is the main consideration in this project. The system is protected from any unauthorized access by giving user name and password during log in process. All the necessary validations are carried out in this project, so that any kind of users can make use of this software and necessary messages makes them conscious of the error they have made. This project incorporates all the requirements of Graphical Password Strategy. The modules in the system help in faster development, implementation and maintenance of the software. This system has been developed as versatile and user friendly as possible keeping in mind the advanced features in this technology. Using ASP.NET and MS SQL SERVER 2000, the system was developed and tested with all possible samples of data. As a whole, the system was well planned and designed. The performance of the system is proved to be efficient. All the Profiles receive an overall benefit through the system. The system provides flexibility for incorporating new features, which may be necessary in future.
Toc H Institute of Science & Technology Arakkunnam 682 313
Page No: 43
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
8.1 Summary
The registration page was created first, from where the users can register to login . The registered users can login and transfer files.Administrator page was created, for the admin to upload images for password attachment and file transfer.The logged users can transfer files hidden inside the selected picture between them.
Page No: 44
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Page No: 45
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
9. BIBILIOGRAPHY
[1]. J. Fridrich and Rui Du, Analysis of LSB & DCT Steganography with M.
Goljan and R. Du, Special session on Theoretical and Practical Issues in Digital Watermarking and Data Hiding, SPIE Multimedia Systems and Applications IV, Denver, CO, August 20-24, 2001, pp. 260-280,1997 [2]. Jessica Fridrich, Detection of Double-Compression in JPEG Images for Applications in Steganography, with T. Pevny, IEEE Trans. on Info. Forensics and Security, 3(2), pp. 247-258, 2008 [3]. Jessica Fridrich and Rui Du Steganalysis Based on JPEG Compatibility, with M. Goljan and R. Du, Special session on Theoretical and Practical Issues in Digital Watermarking and Data Hiding, SPIE Multimedia Systems and Applications IV, Denver, CO, August 20-24, 2001, pp. 275-280,2000 [4]. T. Pevny and J. Fridrich Determining the Stego Algorithm for JPEG
Images, with T. Pevny, Special Issue of IEE Proceedings-Information Security, 153(3), pp. 75-139, 2006
Page No: 46
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Page No: 47
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
User management
Page No: 48
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Upload image
Logout
Page No: 49
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
User registration
Page No: 50
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
User login
File transfer
Page No: 51
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
View files
Page No: 52
Semester: VI
Branch: I.T.
Title: PASS@EMD-IN-JPG
Page No: 53