0% found this document useful (0 votes)
5 views123 pages

crptography

Uploaded by

Sankari Selvaraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views123 pages

crptography

Uploaded by

Sankari Selvaraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 123

1.

INTRODUCTION

There has been a rapid growing trend in the recent times in using online services. A
major benefit of using online services is that users can store their data online and access it
from anywhere. However, many online service providers do not have the capacity to store
large amount of users’ data due to high maintenance cost and complexity. Cloud services
such as cloud storage services are providing solutions to address these issues with the ability
to store and manage increasing amount of users’ data stored online. Online service providers
can outsource users’ data to the public cloud while focusing on the service quality. Since a
public cloud is an open platform, and can be subjected to malicious attacks from both insiders
and outsiders, this has raised several security issues such as how to control and prevent
unauthorized access to data stored in the cloud; this also applies to cloud providers
themselves as the owners of the data may not wish the cloud providers to view or access its
content.

1
1.1 ABOUT THE PROJECT

The trust models provide an approach for the owners and roles to determine the
trustworthiness of individual roles and users respectively in the RBAC system. The proposed
trust models take into account role inheritance and hierarchy in the evaluation of
trustworthiness of roles. We present a design of a trust-based cloud storage system which
shows how the trust models can be integrated into a system that uses cryptographic RBAC
schemes. We have also considered practical application scenarios and illustrated how the
trust evaluations can be used to reduce the risks and enhance the quality of decision making
by data owners and roles of cloud storage service.

2
MODULES EXPLANATION

a) Experience-based Trust
b) Role-based Encryption
c) Trust issues in using cryptographic RBAC schemes in secure cloud storage
a) EXPERIENCE-BASED TRUST
Trust has played a foundational role in security for a long period of time. Most
experience-based trust systems derive the trustworthiness of an entity from both its own
experience and the feedback on the transactions provided by other entities which have had
interactions with the entity concerned in the past. Let us consider a simple example of such a
system. When a client c finishes a transaction with a service provider p, c gives a feedback as
either “positive” or “negative” depending on whether or not c is satisfied with the transaction.
The feedback record is of the form f = (c; p; b; t) where b represents the binary value of the
feedback and t is the timestamp when the transaction took place. This record f is uploaded by
the client to a trust central repository.

b) ROLE-BASED ENCRYPTION
A cryptographic RBAC scheme integrates encryption scheme with RBAC model to
enforce the access control policies in an entrusted environment. This approach allows data to
be encrypted in the way that the cipher text can only be decrypted by those which are allowed
by the access policies. A hierarchical cryptographic access control scheme was proposed in
1983. Because of the similarity in structures between hierarchical access control and RBAC,
a hierarchical cryptographic access control scheme can be easily transformed into a
cryptographic RBAC scheme. The problem of access control for securely outsourcing data
using cryptographic techniques was first considered in . Several cryptographic access control
approaches have been investigated to address the problem of secure data access and cost
effective key management in distributed environments. Among the cryptographic RBAC
schemes in the literature, role-based encryption (RBE) schemes have achieved many superior
characteristics compared to other solutions in terms of efficiency and flexibility.
In this section, we review several concepts in RBE schemes and briefly describe how
it works to assist understanding our proposed trust models. We first describe four types of
entities which are involved in a RBE scheme, The system administrator of the system. It
generates the system parameters and issues all the necessary credentials. In addition, this
administrator manages the role hierarchy structure for the RBAC system.

3
c) TRUST ISSUES IN USING CRYPTOGRAPHIC RBAC SCHEMES IN
SECURE CLOUD STORAGE
Trust issues in using cryptographic RBAC schemes in secure cloud storage. By using
cryptographic RBAC schemes in cloud storage systems, a data owner can encrypt the data to
a role, and only the users who have been granted the membership to the role or the ancestor
role of that role can decrypt the data. In this paper, we assume that the data owners and users
reside outside this role system infrastructure (where the roles are being administered). Hence
the issues to consider are how the data owners can decide whether or not to trust the role
managers in the system and how the role managers can decide whether and how much to trust
the users in the system. Owners consider the trust of role managers in order to ensure that
their data is secure after being assigned to the roles, and role managers consider the trust of
users so that users with negative behaviors are excluded from the roles, which in turn makes
owners trust these roles. In this section, we discuss the trust issues that need to be considered
by the data owners and role managers of a cryptographic RBAC system.

4
1.2 ABOUT THE COMPANY

Hewlett Packard Enterprise Co. is the provider of technology solutions customers


need to optimize their traditional information technology while helping them build the secure,
cloud-enabled, mobile-ready future that is suited to their needs. It offers servers,
storage ,networking, converged systems, software and services ,combined with its financing
solutions. Hewlett Packard Enterprise was founded on November 1, 2015 and is
headquartered in Palo Alto, CA.

Hewlett Packard Enterprise (HPE) provides total enterprise solutions. They are a
major player in the storage industry and are the closest competitor to Cisco in the Networking
solutions domain. The recent spin-off of HPE from the parent has brought about a greater
clarity of the business .Further, by exiting from loss leaders such as public cloud ,the
management has put significant efforts to bring in a more conservative, leaner and disciplined
strategy that is aligned with HPE’s core competencies of storage, servers, networking and
hybrid cloud services.

A key strategic decision by HPE has been its partnership with Microsoft in the public
cloud domain. By partnering with a flagship Microsoft product such as Azure, the motto of
HPE has been “If you cannot beat them join them. Further the acquisition of Aruba for $3B in
May 2015 has added to its portfolio of offerings in the mobile WLAN space. While M&A
has been a part of HPE, there has been significant talk by the CEO, Meg Whitman, about
organic growth and investment in R&D, necessary to add value to the organization.

We estimate Enterprise Group and Software segment to grow at 2.96% and 3.49% in
2016 and 2017 respectively .Enterprise Group that caters to the core products of HPE is likely
to see strong sales due to its niche products and also due to the sales of Aruba products post
its acquisition by HPE.

5
We expect the negative growth trends to continue for Enterprise services and
Financial Services segment and expect the segments to contract at -5.46% and -5.46% in
2016. Our projections indicate that the cumulative negative top line growth of recent years to
continue into 2016 at a growth rate of -0.66%, while we expect year2017 to set HPE on the
path of a healthy fiscal recovery at a growth rate of 0.41% and the growth to pick up
thereafter. We believe the intrinsic stock value is most closely approximated by the DCF
valuation, which presents a value of $21.52, as it most closely captures the revenue
decomposition and growth forecasts of the different segments of business. The stock
currently trades for around $15.68 and thus we estimate an upside of 37% that can be
captured in the long run. We believe this is a value stock and hence we have given a buy
rating to the stock.

6
2. SYSTEM STUDY

2.1 EXISTING SYSTEM

As an extension of the owners’ RBAC trust model, our trust models have also
addressed the roles’ trust on users. The existing works control the access privileges of a user
depending on his or her trust level. The differences between our model and the existing ones
are that our roles’ trust model works in the RBAC systems which use cryptographic RBAC
schemes. That is, our models take into account cryptographic operations and the access
privilege to decrypt the data stored in the cloud, which none of the existing works address.

7
2.2 PROPOSED SYSTEM

The proposed trust models take into account role inheritance and hierarchy in the
evaluation of trustworthiness of roles. We present a design of a trust-based cloud storage
system which shows how the trust models can be integrated into a system that uses
cryptographic RBAC schemes. Many access control models have been proposed over the
years in the literature. In this context, role-based access control (RBAC) is a well-known
access control model which can help to simplify security management especially in large-
scale systems. In the RBE scheme proposed in the paper the users management can be
decentralized to individual roles; that is, the administrators only manage the roles and the
relationship among them while the roles have the flexibility in specifying the user
memberships themselves. The proposed trust models address the missing aspect of trust in
cryptographic RBAC schemes to secure data storage in the cloud, and can provide better
protection of stored data than using cryptographic approaches alone. The paper has
proposed trust models for owners and roles in RBAC systems which are using
cryptographic RBAC schemes to secure stored data.

8
2.3 FEASIBILITY STUDY

Feasibility study is the test of a system proposal according to its workability,


impact on the organization, ability to meet user needs and effective use of resources. It
focuses on the evaluation of existing system and procedures analysis of alternative candidate
system cost estimates. Feasibility analysis was done to determine whether the system would
be feasible.

Technical Feasibility

The technology used can be developed with the current equipments and has the
technical capacity to hold the data required by the new system. Technical feasibility on the
existing system and to what extend it can support the proposed addition. We can add new
modules easily without affecting the Core program. Most of parts are running in the server
using the concept of stored procedures.

 This Technology support the modern trends of technology


 Easily accessible, more secure technology.

Operational Feasibility

This proposed system can easily be implemented, as this based on ASP coding(C#) &
XML. The resources that are required to implement/install these are available. The personal
of the organization already has enough exposure to computers. So the project is operationally
feasible.

Economical Feasibility

Economic analysis is the most frequently used method for evaluating the effectiveness
of a new system. More commonly known cost / beneficial analysis, the procedure is to
determine the benefits and savings that are expected from a candidate system and compare
them with costs. If benefits outweigh costs, then the decision is made to design and
implement the system. The system is more feasible and so it is economically good project.

9
3. REQUIREMENT ANALYSIS

3.1 BUSINESS SYSTEM

10
4. SYSTEM ANALYSIS
4.1 DATA FLOW DIAGRAM
i) DEFINITION
A data flow diagram (DFD) is a graphical representation of the "flow" of data
through an information system, modeling its process aspects.
A DFD is often used as a preliminary step to create an overview of the
system, which can later be elaborated. DFDs can also be used for the visualization of data
processing.

CHARACTERISTICS
 Information and/or data flow is represented by a labeled arrow
 Processes (transformations) are represented by labeled circles (bubbles)
 Information sources and sinks are represented by boxes
 Files and depositories are represented by a rounded rectangle or a double line.

ii) SYMBOLS USED

Symbol Meaning Example

An entity.
A source
of data or a
destination
for data.

A process
or task that
is
performed
by the
system.

11
A data
store, a
place
where data
is held
between
processes.

A data
flow.

ADVANTAGES OF DFD

 A simple graphical technique which is easy to understand.


 It helps is defining the boundaries of the system.
 It is useful for communicating current system knowledge to the users.
 It explain the logic behind the dataflow within the system.

DISADVANTAGES OF DFD

 DFD undergoes lot of alteration before going to users, so makes the process little
slow.
 It make the programmers little confusing towards the system.
 Physical consideration are left

12
iii) DATAFLOW DIAGRAM

Level 0 DFD

User Reg/login File Upload

Database

Level 1 DFD

Admin Reg/login File view

Access control

Database

Over All DFD

Database
User File upload

Admin

Verification

Access Control

13
4.2 ENTITY RELATIONSHIP DIAGRAM

i) DEFINITION

An entity-relationship diagram (ERD) is a data modeling technique that graphically


illustrates an information system’s entities and the relationships between those entities. An
ERD is a conceptual and representational model of data used to represent the entity
framework infrastructure.

FEATURES

 Start with an ERD template then add entities, actions, and attributes by clicking
simple commands in the Smart Panel.
 To add an ERD symbol to your page, click on it and without releasing the mouse,
drag it to the page or just click once in the page to stamp it.
 To connect an attribute or an action to any entity on the page, select the appropriate
symbol .

ii) SYMBOLS USED IN ER DIAGRAM

1. Entity
 An entity is a real-world object.
Eg : student

ENTITY

2. Attribute
 An attribute is a property which describes the entity

ATTRIBUTE

3. Relationships
 A relationship describes how entities interact.

RELATIONSHI
P

4. Weak entity

14
 A weak entity is an entity that depends or derived from another entity.

WEAK ENITITY

5. Weak Attribute
 It is also called as multi valued attribute
 If an attribute can have more than one value it is called a multi valued
attribute.
 It is important to note that this is different to an attribute having its
own attributes.

MULTI VALUED
ATTRIBUTE

6. Weak Relationship
 Indirect relationships between the entities are referred as weak
relationships.

WEAK

RELATION

7. Key Attribute
 Primary key

Key attribute

8. Composite Attribute

ATTRIBUTE

ATTRIBUTE

ATTRIBUTE

15
iii) ENTITY RELATIONSHIP DIAGRAM

rank
Mobile number
date
Security key

emailid

USER login
age
REGISTRATION
block
gender
password
ownerpwd id
FILE ACCESS
Ownerid

FILE REPORT FILE DETAILS

fileid
roles serverkey

auditor
fsubject

tpa
File_REPORT
REGISTRATION_2
filepath
count
fencryptkey
M1
filebytes
status

M2
ftext fowner
M6
M3 filename
M5
M4 fdatetime

16
5. SYSTEM REQUIREMENT SPECIFICATION

5.1 HARDWARE REQUIREMENTS

System : Pentium IV 2.4 GHz.


Hard Disk : 40 GB.
Floppy Drive : 1.44 Mb.
Monitor : 14’ Colour Monitor.
Mouse : Optical Mouse.
Ram : 512 Mb.

5.2 SOFTWARE REQUIREMENTS

Operating system : Windows 7,8,8.1


Coding Language : ASP.Net with C#
Front-End : Visual Studio 2010
Data Base : SQL Server 2008 R2.

17
5.3 SOFTWARE SPECIFICATION

5.3.1 FRONT END SPECIFICATION

VISUAL STUDIO 2010


Microsoft Visual Studio is an integrated development environment (IDE) from
Microsoft. It is used to develop computer programs for Microsoft Windows, as well
as web sites, web applications and web services. Visual Studio uses Microsoft
software development platforms such as Windows API, Windows Forms, Windows
Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce
both native code and managed code.

Visual Studio includes a code editor supporting IntelliSense (the code


completion component) as well as code refactoring. The integrated debugger works
both as a source-level debugger and a machine-level debugger. Other built-in tools
include a forms designer for building GUI applications, web designer, class designer,
and database schema designer. It accepts plug-ins that enhance the functionality at
almost every level—including adding support for source-control systems (like
Subversion) and adding new toolsets like editors and visual designers for domain-
specific languages or toolsets for other aspects of the software development lifecycle
(like the Team Foundation Server client: Team Explorer).

Visual Studio supports different programming languages and allows the code
editor and debugger to support (to varying degrees) nearly any programming
language, provided a language-specific service exists. Built-in languages include C,
C++ and C++/CLI (via Visual C++), VB.NET (via Visual Basic .NET), C# (via
Visual C#), and F# (as of Visual Studio 2010). Support for other languages such as
Python, Ruby, Node.js, and M among others is available via language services
installed separately. It also supports XML/XSLT, HTML/XHTML, JavaScript and
CSS. Java (and J#) was supported in the past.

Before Visual Studio 2015, commercial versions of Visual Studio were


available for free to students via Microsoft's DreamSpark program, when only
commercial versions supported plugins. Starting with Visual Studio 2015, Microsoft
provides Community editions, which support plugins, at no cost to all users.

18
SUPPORTED PRODUCTS

 Microsoft Visual C++


 Microsoft Visual C#
Microsoft Visual C#, Microsoft's implementation of the C# language, targets
the .NET Framework, along with the language services that lets the Visual Studio IDE
support C# projects. While the language services are a part of Visual Studio, the compiler
is available separately as a part of the .NET Framework. The Visual C# 2008, 2010 and
2012 compilers support versions 3.0, 4.0 and 5.0 of the C# language specifications,
respectively. Visual C# supports the Visual Studio Class designer, Forms designer, and
Data designer among others.

 Microsoft Visual Basic


 Microsoft Visual Web Developer
 Team Foundation Server

EDITIONS

 Community
 Professional
 Enterprise
 Test Professional
 Express

The languages available as part of the Express IDEs are:

 Visual Basic Express


 Visual C++ Express
 Visual C# Express
 Visual Web Developer Express
 Express for Windows Phone

19
5.3.2 BACK END SPECIFICATION

SQL SERVER 2008 R2


DEFINITION
Microsoft SQL Server is a relational database management
system developed by Microsoft. As a database server, it is a software product with
the primary function of storing and retrieving data as requested by other software
applications which may run either on the same computer or on another computer
across a network (including the Internet).

Microsoft markets at least a dozen different editions of Microsoft SQL Server,


aimed at different audiences and for workloads ranging from small single-machine
applications to large Internet-facing applications with many concurrent users.

FEATURES

SQL Server Management Studio includes the following general features:

 Supports most administrative tasks for SQL Server.


 A single, integrated environment for SQL Server Database Engine management and
authoring.
 Dialogs for managing objects in the SQL Server Database Engine, Analysis Services,
and Reporting Services, that allows you to execute your actions immediately, send
them to a Code Editor, or script them for later execution.
 Non-modal and resizable dialogs allow access to multiple tools while a dialog is open.
 A common scheduling dialog that allows you to perform action of the management
dialogs at a later time.
 Exporting and importing SQL Server Management Studio server registration from one
Management Studio environment to another.
 Save or print XML Showplan or Deadlock files generated by SQL Server Profiler,
review them later, or send them to administrators for analysis.
 A new error and informational message box that presents much more information,
allows you to send Microsoft a comment about the messages, allows you to copy
messages to the clipboard, and allows you to easily e-mail the messages to your
support team.
 An integrated Web browser for quick browsing of MSDN or online help.
 Integration of Help from online communities.

20
 A tutorial on SQL Server Management Studio to help you take advantage of the many
new features and become more productive right away.
 A new activity monitor with filtering and automatic refresh.
 Integrated Database Mail interfaces.
CHARACTERISTICS
 SQL is an ANSI and ISO standard computer language for creating and manipulating
databases.
 SQL allows the user to create, update, delete and retrieve data from a database.
 SQL is a very simple and easy to learn.
 SQL works with database programs like DB2, Oracle, MS Access, Sybase, MS SQL
Server etc.
ADVANTAGES
 High speed: SQL Queries can be used to retrieve large amounts of records from a
database quickly and efficiently.
 Well Defined Standards Exist: SQL databases use long-established standard, which is
being adopted by ANSI & ISO. Non-SQL databases do not adhere to any clear
standard.
 No Coding Required: Using standard SQL it is easier to manage database systems
without having to write substantial amount of code.
 Emergence of ORDBMS: Previously SQL databases were synonymous with
relational database. With the emergence of Object Oriented DBMS, object storage
capabilities are extended to relational databases.

6. SYSTEM DESIGN

21
6.1 TABLE DESIGN

DEFINITION

It is a collection of data stored in standardized format designed to be shared by


multiple users.

The database management system is software that defines a database, stores the
data, supports query language, produces reports and creates data entry screens.

FEATURES

 Minimal data redundancy


 Data consistency
 Integration of data
 Sharing of data
 Enforcement of data
 Data independence
 Uniform security, privacy and integrity
 Integration of data

NORMALIZATION

 The class must be converted to set of database tables.


 The process of determining proper tables for a database is called
normalization.
 Data normalization is a process of defining the tables properly to provide
flexibility,minimize redundancy and ensures data integrity.
 It is a systematic approach of decomposing tables to eliminate the data
redundancy insertion,deletion and updation problem.
 Normalization is used for two purposes:
o Eliminate data redundancy
o Ensuring the data dependancies

FIRST NORMAL FORM: 1NF

22
As per First Normal Form, no two Rows of data must contain repeating group
of information i.e each set of column must have a unique value, such that multiple columns
cannot be used to fetch the same row. Each table should be organized into rows, and each
row should have a primary key that distinguishes it as unique.

Example

After converting it into First Normal Form

SECOND NORMAL FORM : 2NF


As per the Second Normal Form there must not be any partial dependency of any
column on primary key. It means that for a table that has concatenated primary key, each
column in the table that is not part of the primary key must depend upon the entire
concatenated key for its existence. If any column depends only on one part of the
concatenated key, then the table fails Second normal form.

Example:

Student Age Subject

Adam 15 Biology

23
Adam 15 Maths

Alex 14 Maths

New Student Table following 2NF will be :

Student Age

Adam 15

Alex 14

In Student Table the candidate key will be Student column, because all other column
i.e Age is dependent on it.

New Subject Table introduced for 2NF will be

Student Subject

Adam Biology

Adam Maths

Alex Maths

THIRD NORMAL FORM: 3NF

24
Third Normal form applies that every non-prime attribute of table must be
dependent on primary key, or we can say that, there should not be the case that a non-prime
attribute is determined by another non-prime attribute. So this transitive functional
dependency should be removed from the table and also the table must be in Second Normal
form. For example, consider a table with following fields.

Student_Detail Table

Student_id Student_name DOB Street city State Zip

In this table Student_id is Primary key, but street, city and state depends upon Zip. The
dependency between zip and other fields is called transitive dependency. Hence to
apply 3NF, we need to move the street, city and state to new table, with Zip as primary key.

New Student_Detail Table

Student_id Student_name DOB Zip

Address Table :

Zip Street City State

The advantage of removing transtive dependency is,

 Amount of data duplication is reduced.


 Data integrity achieved.

BOYCE-CODD NORMAL FORM: BCNF


Boyce and Codd Normal Form is a higher version of the Third Normal form. This
form deals with certain type of anamoly that is not handled by 3NF. A 3NF table which does
not have multiple overlapping candidate keys is said to be in BCNF. For a table to be in
BCNF, following conditions must be satisfied:

 R must be in 3rd Normal Form


 For each functional dependency ( X -> Y ), X should be a super Key.

FOURTH NORMAL FORM : 4NF

25
 It can exist when there are atleast three attribute in a relation (A,B,C) and one
attribute A determines the other two B and C
 The B and C are independent of each other (i.e) A->B,A->C.
 A relation is in 4NF iff it is in BCNF and there is no multi value dependency.
 (eg) consider the employee task table
 Employeetask(eid,speciality,toolid)
 The employeetask table is not in 4NF because the business rule says employee has
many speciality and each specility has many tools.
 Since there are multivalue dependency the table is not in 4NF and hence it is splitted
into two tables as,
 Employee speciality(eid,speciality)
 Employee tools(eid,toolid)
FIFTH NORMAL FORM: 5NF
It is also called as domain key normal form
 it is good for designing application
 the goal of 5NF is to have each table represent one topic and for all business
rule to be expressed interms of domain constraints and key relationships
example
student(sid,name,major,advisor)
advisor(fid,name,office,discipline)
 5NF says a student can have many advisors but only one for each major
 Therefore primary key sid would not be unique
 Faculty can be advisor for only this discipline therefore their must be an
explicit rule for concerning the major and the discipline
Student(sid,name)
Advisor(sid,major,fid)
Faculty(fid,name,office,discipline)

6.3 DATABASE DESIGN


Data Definition Language (DDL)

26
The standard SQL commands to interact with relational databases are CREATE,
SELECT, INSERT, UPDATE, DELETE and DROP. These commands can be classified into
groups based on their nature:
Oracle uses the following set of commands to define database schema
Create
Creates new databases, tables and views from RDBMS
For example
create table table_name(column_name data type(limit) );
Commit;
Drop
Drop commands deletes views, tables and databases from RDBMS
drop table table_name;
Table table_name dropped
Alter
Modifies database schema.
Alter table table_name column_name ;

Data Manipulation Language (DML)


SQL is equipped with data manipulation language. Dml modifies the database
instance
by inserting, updating and deleting its data. It is responsible for all data modification in
databases. Sql contains the following set of command in dml section:
 select/from/where
 insert into/values
 update/set/where
 delete from/where

These basic constructs allows database programmers and users to enter data and
information into the database and retrieve efficiently using a number of filter options.
Select

27
This is one of the fundamental query command of SQL. It is similar to projection
operation of relational algebra. It selects the attributes based on the condition described by
WHERE clause.
From
This clause takes a relation name as an argument from which attributes are to be
selected/projected. In case more than one relation names are given this clause corresponds to
cartesian product.
Where
This clause defines predicate or conditions which must match in order to qualify
the attributes to be projected.
Transaction Control Language (TCL)
A transaction control language (TCL) is a computer language and a subset of SQL,
used to control transactional processing in a database. A transaction is a logical unit of work
that comprises one or more SQL statements, usually a group of data Manipulation
Language(DML) statements.
Example:
Commit: Commit to apply transaction by saving the database changes .
Rollback: Rollback to undo all changes of a transaction.
SavePoint: Savepoint to divide the transaction into smaller sections. It defines breakpoints
for a transaction to allow partial rollbacks.

TABLE CREATION
PRIMARY KEY
 It is column or set of column that identifies a particular row.
28
 It should be unique.
 The relationship between primary key and the rest of the data is one to one.
FORGIEN KEY
 It is primary key in one table that appears as a field in another table where the
first table has a relationship to the second.
CANDIDATE KEY
 It is key that uniquely identifies a particular row.
 A table can have many candidate key but only one primary key.
COMPOSITE KEY
 In the table more than one column used as a part of primary key.
 Composite keys are needed when the table contains one to many or many to
many relationship with another table.

CREATING TABLES:

TABLE NAME: USER REGISTRATION

29
Column Name Data Type Allow Nulls
ID nvarchar(50) null
OWNER_ID nvarchar(50) null
OWNER_PWD nvarchar(50) null
GENDER nvarchar(50) null
AGE nvarchar(50) null
MOBILE_NUMBER Bigint null
EMAIL_ID nvarchar(50) null
DATE Datetime Null
SECURITY_KEY nvarchar(50) Null
RANK nvarchar(50) Null
BLOCK nvarchar(50) Null

TABLE NAME: REGISATRATION 2

Column Name Data Type Allow Nulls


COUNT nvarchar(50) Null
ROLES nvarchar(50) Null
AUDITOR nvarchar(50) Null
M1 nvarchar(50) Null
M2 nvarchar(50) Null
M3 nvarchar(50) Null
M4 nvarchar(50) Null
M5 nvarchar(50) Null
TPA nvarchar(50) Null
SERVER_KEY nvarchar(50) Null
STATUS nvarchar(50) Null

TABLE NAME: REPORT TABLE

Column Name Data Type Allow Nulls


FILEID nvarchar(50) Null

30
FSUBJECT nvarchar(50) Null
FILEPATH nvarchar(50) Null
FILEBYTE nvarchar(50) Null
FILENAME nvarchar(50) Null
FTEXT nvarchar(50) Null
FDATETIME Datetime Null
FOWNER nvarchar(50) Null
FENCRYPTKEY nvarchar(50) Null

6.2 INTERFACE DESIGN

Interface Design is a discipline of design , dedicated to the design of user


interfaces between man and machine working. For the conditions, objectives and obstacles of
this interaction are explored from both human and technical side and later - to the extent

31
possible - optimized to serve humanity. Goal of interface design is a user interface that is
designed so that the widest possible range of users experiencing an optimal wishes / needs /
target achievement by appropriate action steps. While designers across in the course
of interaction design (Eg Interaction Design ) deal in detail with the behavior and the design
(use cases) of a product, it goes in the interface design to the specific design, though not only
visually, an interface. Both disciplines are difficult to separate, the boundaries are blurred,
because every interaction designers created mostly during the process a graphical interface.

Typical fields of work of interface designers are software design, usability


research, web design or product design .In the definition of Jef Raskin limits the importance
not only on the design of graphical user interfaces (GUI), but uses the term interface is
representative of an "interface between man and machine or human-computer". Speech
recognition is therefore also an interface. Specifically, he says: "An interface called namely
the way how a product performs a specific task - so what the user can do and how the system
responded" In this sense, the term interface design of the German translation "Interface
Design "more justice, so one does not only deal exclusively with the visual, graphic design. A
successful definition of terms Interface Design and Interaction Design is the consideration of
Interaction Design as a design of a process, while the interface design of the design of the
final product comes closest.

The user interface (UI), in the industrial design field of human–machine interaction, is
the space where interactions between humans and machines occur. The goal of this
interaction is to allow effective operation and control of the machine from the human end,
whilst the machine simultaneously feeds back information that aids the operators' decision-
making process. Examples of this broad concept of user interfaces include the interactive
aspects of computer operating systems, hand tools, heavy machinery operator controls,
and process controls. Common practices for interaction specification include user- centered
design, persona, activity-oriented design, scenario-based design, resiliency design.

FEATURES

• Clear
• Concise
• Familiar

32
• Responsive
• Consistent
• Attractive
• Efficient

Clear
Clarity is the most important element of user interface design. Indeed, the whole
purpose of user interface design is to enable people to interact with your system by
communicating meaning and function. If people can’t figure out how your application works
or where to go on your website they’ll get confused and frustrated.

Concise

Clarity in a user interface is great, however, you should be careful not to fall into the
trap of over-clarifying. It is easy to add definitions and explanations, but every time you do
that you add mass. Your interface grows. Add too many explanations and your users will
have to spend too much time reading through them. Keep things clear but also keep things
concise. When you can explain a feature in one sentence instead of three, do it. When you can
label an item with one word instead of two, do it. Save the valuable time of your users by
keeping things concise. Keeping things clear and concise at the same time isn’t easy and
takes time and effort to achieve, but the rewards are great.

Familiar

Many designers strive to make their interfaces ‘intuitive’. intuitive really means
something that can be naturally understood and comprehended. User make something
intuitive by making it ‘Familiar is just that: something which appears like something else
you’ve encountered before. When you’re familiar with something, you know how it behaves
you know what to expect. Identify things that are familiar to your users and integrate them
into your user interface.

Responsive
Responsive means a couple of things. First of all, responsive means fast. The
interface, if not the software behind it, should work fast. Waiting for things to load and using

33
laggy and slow interfaces is frustrating. Seeing things load quickly, or at the very least, an
interface that loads quickly (even if the content is yet to catch up) improves the user
experience.Responsive also means the interface provides some form of feedback. The
interface should talk back to the user to inform them about what’s happening. Have you
pressed that button successfully? How would you know? The button should display a
‘pressed’ state to give that feedback. Perhaps the button text could change to “Loading…”
and it’s state disabled. Is the software stuck or is the content loading? Play a spinning wheel
or show a progress bar to keep the user in the loop.

Consistent

Now, I’ve talked before about the importance of context and how it should guide your
design decisions. I think that adapting to any given context is smart, however, there is still a
level of consistency that an interface should maintain throughout.Consistent interfaces allow
users to develop usage patterns — they’ll learn what the different buttons, tabs, icons and
other interface elements look like and will recognize them and realize what they do in
different contexts. They’ll also learn how certain things work, and will be able to work out
how to operate new features quicker, extrapolating from those previous experiences.

Efficient

A user interface is the vehicle that takes you places. Those places are the different
functions of the software application or website. A good interface should allow you to
perform those functions faster and with less effort. Now, ‘efficient’ sounds like a fairly
vague attribute — if you combine all of the other things on this list, surely the interface will
end up being efficient? Almost, but not quite .What you really really need to do to make an
interface efficient is to figure out what exactly the user is trying to achieve, and then let them
do exactly that without any fuss. You have to identify how your application should ‘work’ —
what functions does it need to have, what are the goals you’re trying to achieve? Implement
an interface that lets people easily accomplish what they want instead of simply
implementing access to a list of features.
6.3 ALGORITHMS USED

34
All the required algorithms in the RBE scheme have been executed properly to setup
the system parameters. We first look at the case where an owner wants to encrypt a
message M to the role R3. The inputs of the RBE encryption are the system public keys
pk and the role public parameters pubR3 of R3, and the output of the algorithm is the
cipher text tulle.

RBE decryption algorithm to recover the message M, and the inputs of the algorithm
are pk, the role public parameters pub R1 the user decryption key dkU1 and the cipher
text C. The algorithm outputs the message M if the decryption key dkU1 that U1 holds is
valid.

Trust issues that need to be considered by the data owners and role managers of a
cryptographic RBAC system.

7. SCREENSHOTS

35
Figure: 7.1 Home Page

Figure: 7.2 User Login Page

36
Figure: 7.3 User Registration Page

Figure: 7.4 Admin Login Page

37
Figure: 7.5 Client Details

Figure: 7.6 Encrypted Key Generation Page

38
Figure: 7.7 User Behaviour Auditor Page

Figure: 7.8 Owner Login

39
Figure: 7.9 Owner Cloud Storage Server Page

Figure: 7.10 Roles Login

40
Figure: 7.11 Trust Based Access Page

Figure: 7.12 User File Upload Page

41
Figure: 7.13 User Behavior Page

Figure: 7.14 Download page

42
Figure: 7.15 User File Upload Page

Figure: 7.16 User Roles Auditor Page

43
8. CODING
AdminLogin.aspx
<%@PageLanguage="C#"AutoEventWireup="true"MasterPageFile="~/
Administrator.master" CodeFile="AdminLogin.aspx.cs" Inherits="AdminLogin" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="cc1" %>
<asp:Content ContentPlaceHolderID="tpalogin" runat="server">
<asp:Label style="position:absolute; top: 216px; left: 445px;" ID="Label1"
runat="server" Text="Administrator" Font-Size="14pt"
Font-Names="Verdana" Font-Bold="True"
ForeColor="#CC3300"></asp:Label>
<asp:Panel style="position:absolute; width: 360px; top: 258px; left: 259px; height: 207px;"
ID="Panel1" runat="server" BorderWidth="4px" BorderColor="#CC3300"
BorderStyle="Solid">
<asp:Label style="position:absolute; top: 35px; left: 21px;" ID="Label2" runat="server"
Font-Bold="True" Font-Names="Verdana" Font-Size="Medium"
Text="Admin Id"></asp:Label>
<asp:TextBox style="position:absolute; top: 35px; left: 146px; width: 185px; height: 25px;
text-align: center;" ID="TextBox1" runat="server" Font-Names="Bookman Old Style" Font-
Size="16"></asp:TextBox>
<asp:Label style="position:absolute; top: 95px; left: 21px;" ID="Label3"
runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="Medium"
Text="Password"></asp:Label>
<asp:TextBox style="position:absolute; top: 95px; left: 146px; width: 185px; height: 25px;"
ID="TextBox2" runat="server" TextMode="Password"
Font-Names="Bookman Old Style" Font-Size="16"></asp:TextBox>
<asp:Button STYLE="position:absolute; background-color: Transparent; background-image:
url('Images/red.jpg'); top: 149px; left: 72px; width: 97px; height: 32px;"
ID="Button1" runat="server" Text="Submit" Font-Size="15pt" ForeColor="#CC3300"
Font-Names="Imprint MT Shadow" onclick="Button1_Click" Font-Bold="True" />
<asp:Button STYLE="position:absolute; background-color: Transparent; background-image:
url('Images/red.jpg'); top: 149px; left: 187px; width: 97px; height: 32px;"
ID="Button2" runat="server" Text="Clear" Font-Size="15pt" ForeColor="#CC3300"
Font-Names="Imprint MT Shadow" onclick="Button2_Click" Font-Bold="True" />
</asp:Panel><asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" STYLE="position:absolute; top: 434px; left: 764px; width: 149px;"
PostBackUrl="~/Default.aspx">Back to Home</asp:LinkButton>
<cc1:DropShadowExtender ID="DropShadowExtender1" runat="server" Opacity=".1"
TargetControlID="Panel1" Rounded="true" Radius="3"> </cc1:DropShadowExtender>
<cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server"
WatermarkCssClass="watermarked" WatermarkText="Administrator ID"
TargetControlID="Textbox1">
</cc1:TextBoxWatermarkExtender><cc1:TextBoxWatermarkExtender
ID="TextBoxWatermarkExtender2" runat="server" WatermarkCssClass="watermarked"
WatermarkText="Password" TargetControlID="Textbox2">
</cc1:TextBoxWatermarkExtender><asp:ScriptManager ID="ScriptManager1"
runat="server"></asp:ScriptManager></asp:Content>

44
AdminLogin.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class AdminLogin : System.Web.UI.Page
{
string upid, uppwd;
protected void Button1_Click(object sender, EventArgs e)
{
upid = TextBox1.Text.ToUpper();
uppwd = TextBox2.Text.ToUpper();
if (TextBox1.Text == "") {
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Administrator ID";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true); }
else
{
if (TextBox2.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Administrator Password";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
if (upid == "ADMIN" && uppwd == "ADMIN")
{ Response.Redirect("CloudReport.aspx"); }
else
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Administrator ID/Password Correcly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}}}}
protected void Button2_Click(object sender, EventArgs e)
{TextBox1.Text = "";
TextBox2.Text = "";
}}

45
AdminOwnerDetails.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class AdminOwnerDetails : System.Web.UI.Page
{
SqlConnectioncon=new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SqlDataAdapter adp = new SqlDataAdapter("Select ownerid from Registration", con);
DataSet ds = new DataSet();
adp.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
DropDownList1.Items.Add(ds.Tables[0].Rows[i]["ownerid"].ToString());
}}}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (DropDownList1.SelectedItem.Text == "--Select--")
{
Panel2.Visible = false;
}
else
{
Panel2.Visible = true;
SqlDataAdapter adp = new SqlDataAdapter("Select * from Registration where ownerid='" +
DropDownList1.SelectedItem.Text + "'", con);
DataSet ds = new DataSet(); adp.Fill(ds);
Label5.Text = ds.Tables[0].Rows[0]["oid"].ToString();
Label8.Text = ds.Tables[0].Rows[0]["ownerid"].ToString();
Label11.Text = ds.Tables[0].Rows[0]["gender"].ToString();
Label14.Text = ds.Tables[0].Rows[0]["age"].ToString();
Label17.Text = ds.Tables[0].Rows[0]["mobile"].ToString();
Label20.Text = ds.Tables[0].Rows[0]["emailid"].ToString();
Label23.Text = ds.Tables[0].Rows[0]["date"].ToString();
}}}

46
AdminOwnerDetails.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/TPAMasterPage.master" CodeFile="AdminOwnerDetails.aspx.cs"
Inherits="AdminOwnerDetails" %>
<asp:Content ContentPlaceHolderID="AdminOwnerDetails" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Client Details !</marquee>
</font></asp:Panel>
<asp:Label style="position:absolute; top: 205px; left: 21px;" ID="Label1"
runat="server" Font-Italic="True" Font-Bold="True"
Font-Names="Verdana" Font-Size="X-Large" Text="Client Details!!!"
ForeColor="#CC3300" BackColor="#FFFFCC"></asp:Label>
<asp:Label style="position: absolute; top: 270px; left: 75px;" ID="Label2"
runat="server" Text="Select Client Name" Font-Bold="false" Font-Italic="False"
Font-Names="Baskerville Old Face" Font-Size="Large"></asp:Label>
<asp:DropDownList style="position: absolute; top: 301px; left: 70px; height: 25px; width:
176px;"
ID="DropDownList1" runat="server" Font-Bold="True"
Font-Names="Baskerville Old Face" Font-Size="Large" AutoPostBack="True"
onselectedindexchanged="DropDownList1_SelectedIndexChanged" >
<asp:ListItem Text="--Select--" Value="--Select--" Selected="True"></asp:ListItem>
</asp:DropDownList>
<asp:Panel style="position: absolute; top: 306px; left: 254px; height: 388px; width: 433px;"
ID="Panel2" runat="server" Visible="false" BorderWidth="2"
BorderColor="#CC3300">
<asp:Label style="position: absolute; top: 40px; left: 45px;" ID="Label3"
runat="server" Text="Client ID" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 40px; left: 180px;" ID="Label4"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 40px; left: 240px;" ID="Label5"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 93px; left: 45px;" ID="Label6"
runat="server" Text="Client Name" Font-Names="Rockwell"
FontSize="Large"></asp:Label>
<asp:Label style="position: absolute; top: 93px; left: 180px;" ID="Label7"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 93px; left: 240px;" ID="Label8"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 146px; left: 45px;" ID="Label9"
runat="server" Text="Gender" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 146px; left: 180px;" ID="Label10"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 146px; left: 240px;" ID="Label11"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 199px; left: 45px;" ID="Label12"
runat="server" Text="Age" Font-Names="Rockwell" Font-Size="Large"></asp:Label>

47
<asp:Label style="position: absolute; top: 199px; left: 180px;" ID="Label13"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 199px; left: 240px;" ID="Label14"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 252px; left: 45px;" ID="Label15"
runat="server" Text="Mobile" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 252px; left: 180px;" ID="Label16"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 252px; left: 240px;" ID="Label17"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 305px; left: 45px;" ID="Label18"
runat="server" Text="Emailid" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 305px; left: 180px;" ID="Label19"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 305px; left: 240px;" ID="Label20"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 358px; left: 45px;" ID="Label21"
runat="server" Text="Date" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 358px; left: 180px;" ID="Label22"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 358px; left: 240px;" ID="Label23"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label></asp:Panel>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/tpaverify.aspx" >Alert Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/KeyResponses.aspx"
STYLE="position:absolute; top: 475px; left: 755px; width: 161px;">Key
Responses</asp:LinkButton>
<asp:LinkButton ID="LinkButton5" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/Intruderdetails.aspx"
STYLE="position:absolute; top: 515px; left: 755px; width: 176px;">Intruder
Details</asp:LinkButton>
<asp:LinkButton ID="LinkButton4" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/AdminOwnerDetails.aspx"
STYLE="position:absolute; top: 555px; left: 755px; width: 161px;">Client
Details</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black"
STYLE="position:absolute; top: 595px; left: 755px; width: 149px;"
PostBackUrl="~/Default.aspx">Signout</asp:LinkButton>
</asp:Content>

48
ClientRegistration.aspx
<%@PageLanguage="C#"AutoEventWireup="true"MasterPageFile="~/
ClientMasterPage.master" CodeFile="ClientRegistration.aspx.cs"
Inherits="ClientRegistration" %>
<asp:Content ContentPlaceHolderID="ClientRegistration" runat="server">
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="True"
Font-Size="Large" Font-Underline="False"
ForeColor="Black" onclick="LinkButton2_Click"
Font-Names="Segoe Condensed">Client Login</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True"
Font-Size="Large" Font-Underline="False"
ForeColor="Black"
STYLE="position:absolute; top: 475px; left: 755px; width: 213px;"
onclick="LinkButton1_Click" Font-Names="Segoe Condensed">Client
Registration</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Size="Large" Font-Underline="False"
ForeColor="Black"
STYLE="position:absolute; top: 515px; left: 755px; width: 149px;"
PostBackUrl="~/Default.aspx" Font-Names="Segoe Condensed">Back to
Home</asp:LinkButton>
<asp:Label style="position:absolute; top: 201px; left: 310px; right: 650px; height: 36px;"
ID="Label13" runat="server" Font-Names="Tunga" Font-Size="X-Large"
Text="User Sign In:" Font-Bold="True" ForeColor="#990000"></asp:Label>
<asp:Label style="position:absolute; top: 209px; left: 510px; right: 296px; height: 28px;"
ID="Label9" runat="server" Font-Names="Tunga" Font-Size="X-Large"
Text="Cloud Account Registration:" Font-Bold="True" ForeColor="#990000"></asp:Label>
<asp:Panel style="position:absolute; width: 414px; top: 267px; left: 286px; height: 405px;"
ID="Panel1" runat="server" BorderWidth="5px"
BorderColor="#CC3300" BackColor="#FEE8E0" BorderStyle="Double">
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Names="Verdana"
Font-Size="Small" ForeColor="#990000"
style="position:absolute; top: 35px; left: 68px;" Text="Client Id"></asp:Label>
<asp:TextBox style="position:absolute; top: 35px; left: 219px; width: 163px; height: 24px;
text-align: center;" ID="TextBox1" runat="server" Font-Names="Verdana" Font-
Size="Small" Font-Bold="True"></asp:TextBox>
<asp:Label style="position:absolute; top: 75px; left: 68px;" ID="Label3"
runat="server" Font-Names="Verdana" Font-Size="Small"
Font-Bold="True" ForeColor="#990000" Text="Password"></asp:Label>
<asp:TextBox style="position:absolute; top: 75px; left: 219px; width: 163px; height: 24px;
text-align: center;"
ID="TextBox2" runat="server" TextMode="Password"
Font-Names="Verdana" Font-Size="Small" Font-Bold="True"></asp:TextBox>
<asp:Label style="position:absolute; top: 115px; left: 68px;" ID="Label4"
runat="server" Font-Names="Verdana" Font-Size="Small"
Font-Bold="True" ForeColor="#990000" Text="Gender"></asp:Label>
<asp:RadioButtonList RepeatDirection="Horizontal"
style="position:absolute; top: 115px; left: 219px; width: 236px;"

49
Font-Bold="True" Font-Names="Verdana" Font-Size="Small" ID="RadioButtonList1"
runat="server">
<asp:ListItem Text="Male" Value="Male"></asp:ListItem>
<asp:ListItem Text="Female" Value="Female"></asp:ListItem>
</asp:RadioButtonList>
<asp:Label style="position:absolute; top: 155px; left: 68px;" ID="Label5"
runat="server" Font-Names="Verdana" Font-Size="Small"
Font-Bold="True" ForeColor="#990000"
Text="Age" ></asp:Label><asp:TextBox MaxLength="3"
OnKeyPress="ValidateNumeric()" style="position:absolute; top: 155px; left: 219px; width:
163px; height: 24px; text-align: center;" Font-Names="Verdana" Font-Size="Small"
ID="TextBox3" runat="server" Font-Bold="True"></asp:TextBox>
<asp:Label style="position:absolute; top: 195px; left: 68px;" ID="Label6"
runat="server" Font-Names="Verdana" Font-Size="Small"
Font-Bold="True" ForeColor="#990000"
Text="Phone"></asp:Label>
<asp:TextBox MaxLength="14" OnKeyPress="ValidateNumeric()"
style="position:absolute; top: 195px; left: 219px; width: 163px; height: 24px; text-align:
center;" Font-Names="Verdana" Font-Size="Small" ID="TextBox4" runat="server"
Font-Bold="True"></asp:TextBox><asp:Label style="position:absolute; top: 235px; left:
68px;" ID="Label7" runat="server" Font-Names="Verdana" Font-Size="Small" Font-
Bold="True" ForeColor="#990000" Text="Email ID"></asp:Label><asp:TextBox
style="position:absolute; top: 235px; left: 219px; width: 163px; height: 24px; text-align:
center;" Font-Names="Verdana" Font-Size="Small" ID="TextBox5" runat="server" Font-
Bold="True"></asp:TextBox> <asp:Label style="position:absolute; top: 275px; left: 68px;"
ID="Label8"runat="server" Font-Names="Verdana" Font-Size="Small" Font-Bold="True"
ForeColor="#990000" Text="Date"></asp:Label>
<asp:TextBox Enabled="false"
style="position:absolute; top: 275px; left: 219px; width: 163px; height: 24px; text-align:
center;" Font-Names="Verdana" Font-Size="Small" ID="TextBox6" runat="server"
Font-Bold="True"></asp:TextBox>
<asp:Button STYLE="position:absolute; background-color: Transparent; background-image:
url('Images/btnadmin1.jpg'); top: 337px; left: 140px; width: 78px; height: 27px;"
ID="Button1" runat="server" Text="Submit" Font-Names="Verdana" Font-Size="Medium"
Font-Bold="True" ForeColor="#CC3300" onclick="Button1_Click"
BackColor="White" /><asp:Button STYLE="position:absolute; background-color:
Transparent; background-image: url('Images/btnadmin1.jpg'); top: 338px; left: 258px; width:
80px; height: 27px;"ID="Button2" runat="server" Text="Clear" Font-Names="Verdana"
Font-Size="Medium"Font-Bold="True" ForeColor="#CC3300" onclick="Button2_Click"
BackColor="White" /><br />
</asp:Panel><asp:Panel style="position:absolute; width: 288px; top: 275px; left: 307px;
height: 249px;" ID="Panel2" runat="server" BorderWidth="5px" BackColor="White"
BorderColor="#990000" BorderStyle="Groove">
<asp:Label style="position:absolute; top: 35px; left: 11px;" ID="Label1"
runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="Small"
Text="Client Id" ForeColor="#CC6600"></asp:Label>
<asp:TextBox style="position:absolute; top: 34px; left: 107px; width: 166px; height: 24px;
text-align: center;" ID="TextBox7" runat="server" Font-Names="Verdana" Font-
Size="Small" Font-Bold="True"></asp:TextBox>
<asp:Label style="position:absolute; top: 85px; left: 14px;" ID="Label10"

50
runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="Small"
Text="Password" ForeColor="#CC6600"></asp:Label>
<asp:TextBox style="position:absolute; top: 79px; left: 107px; width: 166px; height: 24px;
text-align: center;" ID="TextBox8" runat="server" TextMode="Password"
Font-Names="Verdana" Font-Size="Small" Font-Bold="True"></asp:TextBox>
<asp:Button STYLE="position:absolute; background-image: url('Images/red1.jpg'); top:
179px; left: 0px; width: 288px; height: 33px;" ID="Button7" runat="server" Text="Click
here to send keygen key" Font-Size="13pt" ForeColor="#CC0000" Font-Names="Imprint
MT Shadow" onclick="Button7_Click" BackColor="White" Font-Bold="True"/>
<asp:Button ID="Button3" runat="server" BackColor="White"
Font-Names="Imprint MT Shadow" Font-Size="15pt" ForeColor="#CC0000"
onclick="Button3_Click" STYLE="position: absolute; background-image:
url('Images/red1.jpg'); top: 124px; left: 37px; width: 88px; height: 31px;" Text="Sign in"
Font-Bold="True" />
<asp:Button STYLE="position:absolute; background-image: url('Images/red1.jpg'); top:
125px; left: 155px; width: 88px; height: 31px;"
ID="Button4" runat="server" Text="Clear" Font-Size="15pt" ForeColor="#CC0000"
Font-Names="Imprint MT Shadow" onclick="Button4_Click" BackColor="White"
Font-Bold="True" /><asp:Label ID="Label14" runat="server"
style="position:absolute; top: 220px; left: 130px;" Text="Label"
Font-Bold="True" Font-Names="Imprint MT Shadow" Font-Underline="False"
ForeColor="#FF9900"></asp:Label></asp:Panel>
<asp:Panel style="position:absolute; width: 318px; top: 259px; left: 400px; height: 155px;"
ID="Panel3" runat="server" BorderWidth="2" BackColor="White"
BorderColor="#FF3300">
<asp:ImageButton style="position:absolute; top: 1px; left: 267px"
ID="ImageButton2" runat="server" ImageUrl="~/Images/close.jpg" Height="25"
Width="25" onclick="ImageButton2_Click"/>
<asp:Label style="position:absolute; top: 0px; left: -1px; height: 20px;" Font-Size="Small"
ID="Label11" runat="server" Text="Public Auditability Key is sent to your mail !"
ForeColor="Red" Visible="False" Font-Bold="True"></asp:Label>
<asp:Label style="position:absolute; top: 25px; left: 2px; height: 20px;" Font-Size="Small"
ID="Label12" runat="server" Text="Public Auditability Key" Visible="False"
Font-Bold="True" Font-Names="Verdana"></asp:Label>
<asp:TextBox ID="TextBox9" runat="server" Font-Bold="True" Font-Names="Verdana"
Font-Size="Small" style="position:absolute; top: 44px; left: 3px; height: 24px; width: 176px;
text-align: center;" TextMode="Password" Visible="False"></asp:TextBox>
<asp:Button style="position:absolute; background-color: Transparent; background-image:
url('Images/red1.jpg'); top: 89px; left: 10px; height: 27px; width: 57px;"
ID="Button5" runat="server" Text="Sign in" onclick="Button5_Click"
CausesValidation="false" ForeColor="#993300" Font-Size="12pt" Font-Names="Imprint
MT Shadow" Visible="False" BackColor="White" Font-Bold="True"/>
<asp:Button style="position:absolute; background-color: Transparent; background-image:
url('Images/red1.jpg'); top: 91px; left: 94px; height: 27px; width: 59px;"
ID="Button6" runat="server" Text="Cancel" CausesValidation="false"
ForeColor="#993300" Font-Size="12pt" Font-Names="Imprint MT Shadow"
onclick="Button6_Click" Visible="False" BackColor="#CCCCCC" Font-Bold="True"/>
<asp:LinkButton ID="LinkButton4" runat="server" onclick="LinkButton4_Click"
ToolTip="Click &amp; Get Security Key" Font-Bold="True">Get Key
Offline</asp:LinkButton>

51
</asp:Panel></asp:Content>
ClientRegistration.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.IO;
using System.Net;
using System.Net.Mail;
using System.Text;
using System.Security.Cryptography;
public partial class ClientRegistration : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
Class1 cs = new Class1();
int ownerid, Securitykey = 0;
string owrid, yes, yes1;
string owrid1, owrpwd, yes2,blacked;
string pas1;
string gMailAccount = "[email protected]";
string password = "alliswell1";
string to;
string subject = "secret key for login";
string message;
string Securitykey1;
string ranno,ranno1;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
TextBox6.Text = DateTime.Now.ToShortDateString();
TextBox3.Attributes.Add("OnKeyPress", "ValidateNumeric()");
TextBox4.Attributes.Add("OnKeyPress", "ValidateNumeric()");
Panel1.Visible = false;
Label9.Visible = false;
Panel2.Visible = false;
Panel3.Visible = false;
Label13.Visible = false;
Button7.Visible = false;

52
}
ownerid = cs.idgeneration();
}
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Client ID.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
if (TextBox2.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Client Password.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else {
if (RadioButtonList1.SelectedIndex == -1)
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Select Gender";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else
{
if (TextBox3.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter your age.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
if (TextBox4.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter your contact number.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
if (TextBox5.Text == "")
{
string myStringVariable1 = string.Empty;

53
myStringVariable1 = "Enter your Email ID.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true); }
else
{
SqlDataAdapter adp = new SqlDataAdapter("select * from Registration", con);
DataSet ds = new DataSet();
adp.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
owrid = ds.Tables[0].Rows[i]["ownerid"].ToString();
if (owrid == TextBox1.Text)
{yes = "yes";
goto Outer;}
else
{yes = "no";}}
Outer:
yes1 = "yes";
if (yes != "yes")
{
SqlCommand cmd = new SqlCommand();
con.Open();
cmd.Connection = con;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "SPRegistration";
cmd.Parameters.Add("@oid", SqlDbType.Int, 0);
cmd.Parameters["@oid"].Value = ownerid;
cmd.Parameters.Add("@ownerid", SqlDbType.VarChar, 50);
cmd.Parameters["@ownerid"].Value = TextBox1.Text;
cmd.Parameters.Add("@ownerpwd", SqlDbType.NVarChar, 50);
cmd.Parameters["@ownerpwd"].Value = TextBox2.Text;
cmd.Parameters.Add("@gender", SqlDbType.NVarChar, 10);
cmd.Parameters["@gender"].Value = RadioButtonList1.SelectedItem.Text;
cmd.Parameters.Add("@age", SqlDbType.Int, 3);
cmd.Parameters["@age"].Value = TextBox3.Text;
cmd.Parameters.Add("@mobile", SqlDbType.BigInt, 15);
cmd.Parameters["@mobile"].Value = TextBox4.Text;
cmd.Parameters.Add("@emailid", SqlDbType.NVarChar, 50);
cmd.Parameters["@emailid"].Value = TextBox5.Text;
cmd.Parameters.Add("@date", SqlDbType.NVarChar, 10);cmd.Parameters["@date"].Value
= TextBox6.Text;

cmd.Parameters.Add("@securitykey", SqlDbType.NVarChar, 5);


cmd.Parameters["@securitykey"].Value = Securitykey;
cmd.Parameters.Add("@Rank", SqlDbType.NVarChar, 5);
cmd.Parameters["@Rank"].Value = "0";
cmd.Parameters.Add("@Black", SqlDbType.NVarChar, 5);
cmd.Parameters["@Black"].Value = "True";
cmd.Parameters.Add("@Count", SqlDbType.NVarChar, 5);
cmd.Parameters["@Count"].Value = "0";

54
cmd.Parameters.Add("@RolesAuditor", SqlDbType.NVarChar, 5);
cmd.Parameters["@RolesAuditor"].Value = "Roles Auditor Bending";
cmd.ExecuteNonQuery();
//NetworkCredential loginInfo = new NetworkCredential(gMailAccount, password);
//MailMessage msg = new MailMessage();
//msg.From = new MailAddress(gMailAccount);
//msg.To.Add(new MailAddress(TextBox5.Text));
//msg.Subject = subject;
//msg.Body = message;
//msg.IsBodyHtml = true;
//SmtpClient client = new SmtpClient("smtp.gmail.com");
//client.EnableSsl = true;
//client.UseDefaultCredentials = false;
//client.Credentials = loginInfo;
//client.Send(msg);
//MailMessage mail = new MailMessage();
//mail.To = TextBox5.Text;
//mail.From = gMailAccount;
//mail.Subject = "secret key";
//mail.Body = "this is my test email body";
//mail.BodyFormat = MailFormat.Html;
////mail.Priority = MailPriority.Normal;
//SmtpMail.SmtpServer = "localhost"; //your real server goes here
//SmtpMail.Send(mail);
MsgBox.Show("Registered Successfully");
}
else
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "This Client ID Already Exists.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}}}}}}}}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
RadioButtonList1.SelectedIndex = -1;
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
}
protected void LinkButton2_Click(object sender, EventArgs e)
{ Label9.Visible = false;
Panel1.Visible = false;
Panel2.Visible = true;
Label13.Visible = true;}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Label9.Visible = true;

55
Panel1.Visible = true;
Panel2.Visible = false;
Label13.Visible = false;
}
protected void Button3_Click(object sender, EventArgs e)
{
Session["pas"] = TextBox8.Text;
if (TextBox7.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Client ID";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
if (TextBox8.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Client Password";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
SqlDataAdapter adp = new SqlDataAdapter("select * from Registration", con);
DataSet ds = new DataSet();
adp.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{

owrid1 = ds.Tables[0].Rows[i]["ownerid"].ToString();
owrpwd = ds.Tables[0].Rows[i]["ownerpwd"].ToString();
blacked = ds.Tables[0].Rows[i]["Black"].ToString();
if (TextBox7.Text == owrid1 && TextBox8.Text == owrpwd && blacked=="True")
{

yes2 = "yes";
con.Open();
SqlCommand blsa = new SqlCommand("Update Registration set Count='0' where ownerid='"
+ TextBox7.Text + "'", con);
blsa.ExecuteNonQuery();
con.Close();
}}
if (yes2 == "yes")
{
Session["ownerid"] = TextBox7.Text;
//Response.Redirect("OwnerMain.aspx");
//Panel2.Visible = true;
Button7.Visible = true;

56
//this.Button1.Attributes.Add("onclick", "javascript:return OpenPopup()");
//onClick="genericPopup(this.href,300,300,no)"
//Response.Write("<script>window.close()</script>");
}
else
{
SqlDataAdapter adpb = new SqlDataAdapter("select ownerid,Count from Registration where
ownerid='"+ TextBox7.Text+"'", con);
DataSet dsb = new DataSet();
adpb.Fill(dsb);
Label14.Text=dsb.Tables[0].Rows[0]["Count"].ToString();
if ("0" == Label14.Text)
{
con.Open();
SqlCommand bla = new SqlCommand("Update Registration set Count=Count+1 where
ownerid='" + TextBox7.Text + "'", con);
bla.ExecuteNonQuery();
con.Close();
string count = string.Empty;
count = "Enter Clientid/Password Correctly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + Label14.Text + "');",
true);
}
if ("1" == Label14.Text)
{
con.Open();
SqlCommand bla = new SqlCommand("Update Registration set Count=Count+1 where
ownerid='" + TextBox7.Text + "'", con);
bla.ExecuteNonQuery();
con.Close();
string count = string.Empty;
count = "Enter Clientid/Password Correctly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + Label14.Text + "');",
true);
}
if ("2" == Label14.Text)
{con.Open();
SqlCommand bla = new SqlCommand("Update Registration set Count=Count+1 where
ownerid='" + TextBox7.Text + "'", con);
bla.ExecuteNonQuery();
con.Close();
string count = string.Empty;
count = "Enter Clientid/Password Correctly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + Label14.Text + "');",
true);
}
if ("3" == Label14.Text)
{
con.Open();

57
SqlCommand bla = new SqlCommand("Update Registration set Count=Count+1 where
ownerid='" + TextBox7.Text + "'", con);
bla.ExecuteNonQuery();
con.Close();
Label14.Text = "your Account Blacked";
string count = string.Empty;
count = "Enter Clientid/Password Correctly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + Label14.Text + "');",
true);
}
else
{
con.Open();
SqlCommand blsa = new SqlCommand("Update Registration set Black='Black' where
ownerid='" + TextBox7.Text + "'", con);
blsa.ExecuteNonQuery();
con.Close();
}
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Clientid/Password Correctly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}}}}
protected void Button4_Click(object sender, EventArgs e)
{ TextBox7.Text = "";
TextBox8.Text = ""; }
protected void Button7_Click(object sender, EventArgs e)
{
Panel3.Visible = true;
Button7.Visible = false;
pas1 = (string)Session["pas"];
if (TextBox7.Text == ""){
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Client ID";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else
{
if (pas1 == "")
{string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Client Password";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else{
SqlDataAdapter adp = new SqlDataAdapter("select * from Registration", con);
DataSet ds = new DataSet();
adp.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
owrid = ds.Tables[0].Rows[i]["oid"].ToString();
owrid1 = ds.Tables[0].Rows[i]["ownerid"].ToString();

58
owrpwd = ds.Tables[0].Rows[i]["ownerpwd"].ToString();
if (TextBox7.Text == owrid1 && pas1 == owrpwd)
{
Random val = new Random();
int rno = val.Next(12345, 54321);
ranno = Convert.ToString(rno);
ranno1 = Encrypt(ranno);
Session["rendomnum"] = ranno1;
con.Open();
SqlCommand cmd = new SqlCommand("update Registration set securitykey='" + ranno1 +
"'where oid='" + owrid + "'", con);
cmd.ExecuteNonQuery();
con.Close();
message = "<hr><br>Hello " + "<b>" + owrid + " ! </b><br><br>" + "Your Login Security
Key is : " + "<b>" + ranno1 + "</b>";
to = ds.Tables[0].Rows[i]["emailid"].ToString();
NetworkCredential loginInfo = new NetworkCredential(gMailAccount, password);
MailMessage msg = new MailMessage();
msg.From = new MailAddress(gMailAccount);
msg.To.Add(new MailAddress(to));
msg.Subject = subject;
msg.Body = message;
msg.IsBodyHtml = true;
try{
SmtpClient client = new SmtpClient("smtp.gmail.com");
client.EnableSsl = true;
client.UseDefaultCredentials = false;
client.Credentials = loginInfo;
client.Send(msg);}
catch (Exception ex){
Console.WriteLine(ex);
Label11.Text = "OFFLINE : Failure Sending Mail !";
LinkButton4.Visible = true;}
yes2 = "yes";
}}
if (yes2 == "yes"){
Session["ownerid"] = TextBox7.Text;
Panel3.Visible = true; Label11.Visible = true;
TextBox9.Visible = true; Label12.Visible = true;
Button5.Visible = true; Button6.Visible = true; Button7.Visible = false;
}
else
{string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Clientid/Password Correctly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}}}}
protected void Button5_Click(object sender, EventArgs e)
{Securitykey1 = (string)Session["rendomnum"];
if (TextBox9.Text == Securitykey1)

59
{Session.Remove("rendomnum");
con.Open();
SqlCommand blsas = new SqlCommand("Update Registration set Rank=Rank+1 where
securitykey='" + TextBox9.Text + "'", con);
blsas.ExecuteNonQuery();
con.Close();
Response.Redirect("OwnerFileUpload.aspx");}
else{
TextBox9.Text = "";
//Response.Redirect("OwnerLogin.aspx");
string myStringVariable1 = string.Empty;
myStringVariable1 = "You are not authenticated. Plz try again once.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}}
protected void Button6_Click(object sender, EventArgs e)
{TextBox9.Text = "";}
protected void LinkButton4_Click(object sender, EventArgs e)
{
Panel3.Visible = true; Label11.Visible = true;
TextBox9.Visible = true; Label12.Visible = true;
Button5.Visible = true; Button6.Visible = true; Button7.Visible = false;
TextBox9.Text = (string)Session["rendomnum"];
string myStringVariable1 = string.Empty;
myStringVariable1 = "Your Login Public Key is : " + (string)Session["rendomnum"] ;
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
Panel3.Visible = false; Label11.Visible = false;
Label12.Visible = false; TextBox9.Visible = false;
Button5.Visible = false; Button6.Visible = false;
Button7.Visible = true; Panel2.Visible = true;
}
private string Encrypt(string clearText)
{
string EncryptionKey = "MAKV2SPBNI99212";
//byte[] Key = Encoding.UTF8.GetBytes("asdf!@#$1234ASDF");
byte[] clearBytes = Encoding.Unicode.GetBytes(clearText);
using (Aes encryptor = Aes.Create())
{
Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(EncryptionKey, new byte[] { 0x49,
0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 });
encryptor.Key = pdb.GetBytes(32);
encryptor.IV = pdb.GetBytes(16);
using (MemoryStream ms = new MemoryStream())
{
using (CryptoStream cs = new CryptoStream(ms, encryptor.CreateEncryptor(),
CryptoStreamMode.Write))
{cs.Write(clearBytes, 0, clearBytes.Length);
cs.Close();}

60
clearText = Convert.ToBase64String(ms.ToArray());
}}return clearText;}}
CloudReport.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CloudReport.aspx.cs"


Inherits="CloudReport" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Trust Enhanced Cryptographic Role-based Access Control for Secure Cloud Data
Storage</title><meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" /></head>
<body bgcolor="#999966"><form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div><div id="header"><div id="logo">
<center style="height: 72px; width: 820px"><asp:Label ID="Label2" runat="server"
Text="Trust Enhanced Cryptographic Role-based Access" Font-Bold="True"
Font-Size="XX-Large"></asp:Label><br />
<asp:Label ID="Label3" runat="server" Text="Control for Secure Cloud Data Storage" Font-
Bold="True"Font-Size="XX-Large"></asp:Label></center></div>
<asp:Image ID="Image8" runat="server"style="position:absolute; top: 224px; left: 952px;
width: 181px; height: 178px;"ImageUrl="~/images/user_search.png" />
<asp:Label ID="Label1" runat="server" Text="Owners Cloud Storage Server"
style="position:absolute; top: 173px; left: 407px; width: 276px; height: 28px;" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" ForeColor="Black">
</asp:Label></div><hr /><!-- end header --><!-- start page -->
<div id="wrapper"><div id="page"><div id="page-bgtop"><div id="page-bgbtm">
<center><rsweb:ReportViewer ID="ReportViewer1" runat="server"
style="position:absolute; top: 211px; left: 16px; width: 596px; margin-top: 0px;"
BackColor="#0000CC"Font-Names="Verdana"Font-
Size="8pt"InteractiveDeviceInfos="(Collection)"WaitMessageFont-Names="Verdana"
WaitMessageFont-Size="14pt"><LocalReport ReportPath="Report.rdlc">
<DataSources><rsweb:ReportDataSourceDataSourceId="ObjectDataSource1"
Name="DataSet1" /></DataSources></LocalReport></rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetData" TypeName="DataSet1TableAdapters.RegistrationTableAdapter">
</asp:ObjectDataSource><rsweb:ReportViewer ID="ReportViewer2" runat="server"
style="position:absolute; top: 213px; left: 613px;" BackColor="#FF6666"
Font-Names="Verdana" Font-Size="8pt" InteractiveDeviceInfos="(Collection)"
WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="652px">
<LocalReport ReportPath="Report2.rdlc"><DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource2" Name="DataSet1" />
</DataSources></LocalReport></rsweb:ReportViewer><asp:ObjectDataSource
ID="ObjectDataSource2"runat="server"SelectMethod="GetData"
TypeName="DataSet1TableAdapters.filearchiveTableAdapter"></asp:ObjectDataSource>

61
</center></div></div></div></div><!-- end page --><!-- start footer --><div id="footer">
</div></div></form></body></html>
CloudReport.aspx.cs

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CloudReport.aspx.cs"


Inherits="CloudReport" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Trust Enhanced Cryptographic Role-based Access Control for Secure Cloud Data
Storage</title><meta name="keywords" content=""/><meta name="description"
content=""/><link href="default.css" rel="stylesheet" type="text/css" /></head>
<body bgcolor="#999966"><form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div><div id="header"><div id="logo"><center style="height: 72px; width:
820px"><asp:Label ID="Label2" runat="server"Text="Trust Enhanced Cryptographic Role-
based Access" Font-Bold="True"Font-Size="XX-Large"></asp:Label><br />
<asp:Label ID="Label3" runat="server" Text="Control for Secure Cloud Data Storage" Font-
Bold="True" Font-Size="XX-Large"></asp:Label></center></div><asp:Image ID="Image8"
runat="server"style="position:absolute; top: 224px; left: 952px; width: 181px; height:
178px;"ImageUrl="~/images/user_search.png" />
<asp:Label ID="Label1" runat="server" Text="Owners Cloud Storage Server"
style="position:absolute; top: 173px; left: 407px; width: 276px; height: 28px;" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" ForeColor="Black" >
</asp:Label></div><hr /><!-- end header --><!-- start page --><div id="wrapper"><div
id="page"><div id="page-bgtop"><div id="page-bgbtm"><center><rsweb:ReportViewer
ID="ReportViewer1" runat="server"style="position:absolute; top: 211px; left: 16px; width:
596px; margin-top: 0px;" BackColor="#0000CC"Font-Names="Verdana" Font-Size="8pt"
InteractiveDeviceInfos="(Collection)"WaitMessageFont-Names="Verdana"
WaitMessageFont-Size="14pt"><LocalReport ReportPath="Report.rdlc"><DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="DataSet1" />
</DataSources></LocalReport></rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"SelectMethod="GetData"
TypeName="DataSet1TableAdapters.RegistrationTableAdapter"></asp:ObjectDataSource>
<rsweb:ReportViewer ID="ReportViewer2" runat="server"
style="position:absolute; top: 213px; left: 613px;" BackColor="#FF6666"
Font-Names="Verdana" Font-Size="8pt" InteractiveDeviceInfos="(Collection)"
WaitMessageFont-Names="Verdana"
WaitMessageFont-Size="14pt" Width="652px">
<LocalReport ReportPath="Report2.rdlc"><DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource2" Name="DataSet1" />
</DataSources></LocalReport></rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server"
SelectMethod="GetData" TypeName="DataSet1TableAdapters.filearchiveTableAdapter">
</asp:ObjectDataSource>
</center></div></div></div></div><!-- end page --><!-- start footer -->

62
<div id="footer"></div></div>
</form></body></html>
Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"


Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
Title : Undertaking
Version : 1.0
Released : 2010821
Description: A two-column web design, best for your personal and business blogging.-->
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Trust Enhanced Cryptographic Role-based Access Control for Secure Cloud Data
Storage</title><meta name="keywords" content=""/><meta name="description"
content=""/><link href="default.css" rel="stylesheet" type="text/css" />
</head><body bgcolor="#999966"><form id="form1" runat="server">
<!-- start header --><div id="header"><div id="logo">
<center style="height: 72px; width: 820px"><asp:Label ID="Label4" runat="server"
Text="Trust Enhanced Cryptographic Role-based Access" Font-Bold="True"
Font-Size="XX-Large"></asp:Label><br />
<asp:Label ID="Label5" runat="server" Text="Control for Secure Cloud Data Storage" Font-
Bold="True"Font-Size="XX-Large"></asp:Label>
<asp:ImageButton ID="ImageButton2" runat="server" CssClass="imgbtn"
style="position:relative; top: 42px; width: 80px; height: 34px; right: 20px;"
ImageUrl="~/images/User.png"PostBackUrl="~/ClientRegistration.aspx" /></center></div>
<asp:ImageButton ID="ImageButton1" runat="server" CssClass="imgbtn"
style="position:absolute; top: 86px; left: 165px; width: 74px; height: 34px; right: 845px;"
ImageUrl="~/images/Home.png" PostBackUrl="~/Default.aspx" />
<asp:ImageButton ID="ImageButton3" runat="server" CssClass="imgbtn"
style="position:absolute; top: 86px; width: 140px; height: 34px; left: 247px;"
ImageUrl="~/images/Administrator.png"PostBackUrl="~/AdminLogin.aspx" />
<asp:ImageButton ID="ImageButton4" runat="server" CssClass="imgbtn"
style="position:absolute; top: 86px; left: 393px; width: 140px; height: 36px; bottom: 403px;"
ImageUrl="~/images/Roles.png" PostBackUrl="~/Roleslogin.aspx" />
<asp:ImageButton ID="ImageButton5" runat="server" CssClass="imgbtn"
style="position:absolute; top: 86px; left: 539px; width: 140px; height: 36px;"
ImageUrl="~/images/Owners.png" PostBackUrl="~/tpalogin.aspx" />
<asp:Image ID="Image10" runat="server"style="position:absolute; top: 639px; left: 832px;
width: 181px; height: 178px;"ImageUrl="~/images/user_search.png" />
<asp:Image ID="Image9" runat="server"
style="position:absolute; top: 420px; left: 852px; width: 181px; height: 178px;"
ImageUrl="~/images/535061.png" />
<asp:Image ID="Image8" runat="server"
style="position:absolute; top: 214px; left: 852px; width: 181px; height: 178px;"
ImageUrl="~/images/user_edit.png" />

63
<asp:Image ID="Image6" runat="server"
style="position:absolute; top: 187px; left: 14px; width: 207px; height: 38px;"
ImageUrl="~/images/Architecture.png" />
<asp:Image ID="Image5" runat="server"
style="position:absolute; top: 478px; left: 16px; width: 207px; height: 38px;"
ImageUrl="~/images/Hierarchical RBAC.png" />
<asp:Image ID="Image7" runat="server"
style="position:absolute; top: 227px; left: 211px; width: 608px; height: 246px;"
ImageUrl="~/images/arcful11.png" />
<asp:Image ID="Image4" runat="server"
style="position:absolute; top: 695px; left: 365px; width: 379px; height: 152px;"
ImageUrl="~/images/Arc222tree.png" />
<asp:Image ID="Image2" runat="server"
style="position:absolute; top: 516px; left: 364px; width: 379px; height: 152px;"
ImageUrl="~/images/Arctrree333.png" />
<asp:Label ID="Label3" runat="server" Text="Trust Decision Engine"
style="position:absolute; top: 833px; left: 812px; width: 207px; height: 26px;"
Font-Bold="True" Font-Names="Imprint MT Shadow" Font-Size="Large"
ForeColor="Black" ></asp:Label>
<asp:Label ID="Label6" runat="server" Text="User Behavior Monitor"
style="position:absolute; top: 613px; left: 812px; width: 214px; height: 24px;"
Font-Bold="True" Font-Names="Imprint MT Shadow" Font-Size="Large"
ForeColor="Black" ></asp:Label>
<asp:Label ID="Label2" runat="server" Text="User Behavior Auditor"
style="position:absolute; top: 396px; left: 828px; width: 202px; height: 23px;"
Font-Bold="True" Font-Names="Imprint MT Shadow" Font-Size="Large"
ForeColor="Black" ></asp:Label>
<asp:Label ID="Label1" runat="server" Text="Cryptographic RBAC System"
style="position:absolute; top: 169px; left: 374px;" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="X-Large" ForeColor="Black"
></asp:Label>
<%--<asp:Panel Style="position: absolute; top: 945px; left: 17px; height: 29px; width:
959px;"
ID="Panel1" runat="server">
<font size="6" face="Bookman old style" color="yellow">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px; height: 38px;"
behavior="scroll"
direction="left" scrollamount="15">WWW.chennaisunday.com</marquee>
</font>
<font size="6" face="Bookman old style" color="yellow">
<marquee style="position: absolute; top: 40px; left: 6px; width: 940px; height: 39px;"
behavior="scroll"
direction="right" scrollamount="15">Contact us:9566137117</marquee></font>
</asp:Panel><font size="4" face="Bookman old style" color="yellow">
<marquee style="position: absolute; top: 0px; left: 7px; width: 940px; height: 26px;"
behavior="alternate"direction="left" scrollamount="5">WWW.chennaisunday.com || Contact
us:9566137117</marquee></font>--%>
</div><hr /><!-- end header --><!-- start page --><div id="wrapper"><div id="page"><div
id="page-bgtop"><div id="page-bgbtm"></div></div></div></div><!-- end page -->
<!-- start footer --><div id="footer"></div></form>

64
</body>
</html>
Default2.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs"


Inherits="Default2" %>
<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<asp:Chart ID="Chart1" runat="server">
<Series>
<asp:Series Name="Series1">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
</form>
</body>
</html>

65
Down.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/ClientMasterPage.master"


AutoEventWireup="true" CodeFile="down.aspx.cs" Inherits="down" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ClientRegistration" Runat="Server">
</asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="OwnerFileUpload"
Runat="Server"></asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="packetsending" Runat="Server">
</asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="Download"
Runat="Server"></asp:Content><asp:Content ID="Content5"
ContentPlaceHolderID="Download1" Runat="Server"></asp:Content>
<asp:Content ID="Content6" runat="server"contentplaceholderid="ContentPlaceHolder1">
<p><asp:Button ID="Button1" runat="server" onclick="Button1_Click1"
Text="Button"style="z-index: 1; left: 330px; top: 228px; position: absolute"
Width="292px"/></p><asp:TextBox ID="TextBox1" runat="server"
style="z-index: 1; left: 404px; top: 276px; position: absolute"></asp:TextBox>
&nbsp;<asp:GridView ID="ggt" CssClass="Gridview" runat="server"
AutoGenerateColumns="False" DataKeyNames="FilePath" CellPadding="4"
ForeColor="#333333" GridLines="None"style="z-index: 1; left: 200px; top: 326px; position:
absolute; height: 168px; width: 423px" ><EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" /><Columns>
<asp:BoundField DataField="fid" HeaderText="fid" />
<asp:BoundField DataField="filepath" HeaderText="ffilename" />
<asp:BoundField DataField="fowner" HeaderText="File Owner" />
<asp:BoundField DataField="fenccryptokey" HeaderText="Genproof key" />
<asp:BoundField DataField="fdatetime" HeaderText="Date" />
<asp:TemplateField HeaderText="filePath">
<ItemTemplate>
<asp:LinkButton ID="lnkDownload" runat="server" Text="Download"
OnClick="lnkDownload_Click"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
</p>
<asp:Button ID="Button2" runat="server" onclick="Button2_Click"
style="z-index: 1; left: 1012px; top: 435px; position: absolute"
Text="Back To Home" />
</asp:Content>

66
Down.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
public partial class down : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=SHANKARI;Initial Catalog=Trust
Enhanced Cryptographic;Integrated Security=True");
SqlCommand cmd = new SqlCommand();
protected void Page_Load(object sender, EventArgs e)
{
TextBox1.Visible = false; Button1.Visible = false;
con.Open();
SqlCommand cmd = new SqlCommand("select
fid,ffilename,fowner,fenccryptokey,fdatetime,filepath from filearchive where
keystatus='Sent'", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds); con.Close();
ggt.DataSource = ds;
ggt.DataBind(); }
protected void lnkDownload_Click(object sender, EventArgs e)
{
LinkButton lnkbtn = sender as LinkButton;
GridViewRow gvrow = lnkbtn.NamingContainer as GridViewRow;
string filePath = ggt.DataKeys[gvrow.RowIndex].Value.ToString();
Response.ContentType = "image/jpg";
Response.AddHeader("Content-Disposition", "attachment;filename=\"" + filePath + "\"");
Response.TransmitFile(filePath);
Response.End(); }
protected void Button1_Click1(object sender, EventArgs e)
{
//con.Open();
//SqlCommand cmd = new SqlCommand("select
fid,ffilename,fowner,fenccryptokey,fdatetime,filepath from filearchive where
keystatus='Sent'", con);
//SqlDataAdapter da = new SqlDataAdapter(cmd);
//DataSet ds = new DataSet();
//da.Fill(ds); //con.Close();
//ggt.DataSource = ds;
//ggt.DataBind();
}

67
protected void Button2_Click(object sender, EventArgs e)
{Response.Redirect("default.aspx");}}
Download.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/ClientMasterPage.master" CodeFile="Download.aspx.cs"
Inherits="Download" %>
<asp:Content ContentPlaceHolderID="Download" runat="server">
<asp:Panel Style="position: absolute; top: 110px; left: 89px; height: 18px; width: 959px;"
ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -10px; left: -106px; width: 940px; margin-bottom:
0px;" behavior="scroll" direction="left" scrollamount="15">Alert Message !</marquee>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br /><br /><br /></font></asp:Panel>
<asp:Label style="position:absolute; top: 211px; left: 365px; width: 405px;" ID="Label1"
runat="server" Font-Italic="False" Font-Bold="True"
Font-Names="Britannic Bold" Font-Size="X-Large" Text="TPA issuing files to download"
ForeColor="#0000CC" ></asp:Label>
<asp:GridView style="position: absolute; top: 256px; left: 277px; width: 599px;"
ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333" AllowPaging="True" PageSize="15"
onpageindexchanging="GridView1_PageIndexChanging" GridLines="None" >
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" /><Columns>
<asp:BoundField DataField="fid" HeaderText="File ID" />
<asp:BoundField DataField="ffilename" HeaderText="File Name" />
<asp:BoundField DataField="fowner" HeaderText="File Owner" />
<asp:BoundField DataField="fenccryptokey" HeaderText="Genproof key" />
<asp:BoundField DataField="fdatetime" HeaderText="Date" />
<asp:HyperLinkField HeaderText="Download" Text="Download"
DataNavigateUrlFields="fid" DataNavigateUrlFormatString="down.aspx?ID={0}" />
</Columns><FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333"
HorizontalAlign="Center" /><SelectedRowStyle BackColor="#FFCC66" ForeColor="Navy"
Font-Bold="True" /><HeaderStyle BackColor="#990000" Font-Bold="True"
ForeColor="White" /><AlternatingRowStyle BackColor="White" /></asp:GridView>
<%-- <asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="False"
Font-Names="Snap ITC" Font-Size="Large" Font-Underline="False"
ForeColor="White" PostBackUrl="~/tpaverify.aspx" >Alert Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="False"
Font-Names="Snap ITC" Font-Size="Large" Font-Underline="False"
ForeColor="White" PostBackUrl="~/KeyResponses.aspx"
STYLE="position:absolute; top: 475px; left: 755px; width: 161px;">Key
Responses</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="False"
Font-Names="Snap ITC" Font-Size="Large" Font-Underline="False"
ForeColor="White" PostBackUrl="~/Default.aspx"
STYLE="position:absolute; top: 515px; left: 755px; width: 149px;">Back to
Home</asp:LinkButton>--%>

68
</asp:Content>

Download.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class Download : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where
keystatus='Sent'", con); DataSet ds1 = new DataSet(); adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1; GridView1.DataBind();}
else
{MsgBox.Show("TPA doesn't sent any files to download");}
Session["owner"] = ds1.Tables[0].Rows[0]["fowner"].ToString();
Session["fid1"] = ds1.Tables[0].Rows[0]["fid"].ToString();
Session["fname"] = ds1.Tables[0].Rows[0]["ffilename"].ToString();}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{GridView1.PageIndex = e.NewPageIndex; bindgrid();}
public void bindgrid()
{SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where
keystatus='Sent'", con);
DataSet ds1 = new DataSet(); adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1; GridView1.DataBind();}
else
{MsgBox.Show("TPA doesn't send any files to download");}
Session["owner"] = ds1.Tables[0].Rows[0]["fowner"].ToString();
Session["fid1"] = ds1.Tables[0].Rows[0]["fid"].ToString();
Session["fname"] = ds1.Tables[0].Rows[0]["ffilename"].ToString();}
protected void LinkButton1_Click(object sender, EventArgs e)
{LinkButton lnkbtn = sender as LinkButton;
GridViewRow gvrow = lnkbtn.NamingContainer as GridViewRow;
string filePath = GridView1.DataKeys[gvrow.RowIndex].Value.ToString();
Response.ContentType = "image/jpg";
Response.AddHeader("Content-Disposition", "attachment;filename=\"" + filePath + "\"");

69
Response.TransmitFile(Server.MapPath(filePath));
Response.End();}}
IntruderDetails.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/TPAMasterPage.master" CodeFile="Intruderdetails.aspx.cs"
Inherits="Intruderdetails" %>
<asp:Content ContentPlaceHolderID="Intruderdetails" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Alert Message !</marquee></font></asp:Panel>
<asp:Label style="position:absolute; top: 201px; left: 22px;" ID="Label1"
runat="server" Font-Italic="True" Font-Bold="True"
Font-Names="Britannic Bold" Font-Size="X-Large" Text="Intruder Alerts"
ForeColor="#CC3300" BackColor="#FFFFCC"></asp:Label>
<asp:GridView style="position: absolute; top: 256px; left: 87px; width: 599px;"
ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333" AllowPaging="True" PageSize="15"
onpageindexchanging="GridView1_PageIndexChanging" GridLines="None" >
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" /><Columns>
<asp:BoundField DataField="fid" HeaderText="File ID" />
<asp:BoundField DataField="ffilename" HeaderText="File Name" />
<asp:BoundField DataField="fext" HeaderText="File Type" />
<asp:BoundField DataField="fowner" HeaderText="File Owner" />
<asp:BoundField DataField="fdatetime" HeaderText="Date" />
<asp:BoundField DataField="totalbytes" HeaderText="Total Bytes" /></Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" ForeColor="Navy" Font-Bold="True" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" /> </asp:GridView>
<asp:LinkButton ID="LinkButton2" runat="server" STYLE="position:absolute; top: 435px;
left: 755px;" Font-Bold="True" Font-Names="Imprint MT Shadow" Font-Size="Large"
Font-Underline="False" ForeColor="Black" PostBackUrl="~/tpaverify.aspx" >Alert
Message</asp:LinkButton> <asp:LinkButton ID="LinkButton1" runat="server" Font-
Bold="True" Font-Names="Imprint MT Shadow" Font-Size="Large" Font-
Underline="False" ForeColor="Black" PostBackUrl="~/KeyResponses.aspx"
STYLE="position:absolute; top: 475px; left: 755px; width: 177px;">Key
Responses</asp:LinkButton><asp:LinkButton ID="LinkButton6" runat="server" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/Intruderdetails.aspx"
STYLE="position:absolute; top: 515px; left: 755px; width: 176px;">Intruder
Details</asp:LinkButton><asp:LinkButton ID="LinkButton4" runat="server" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/AdminOwnerDetails.aspx"
STYLE="position:absolute; top: 555px; left: 755px; width: 161px;">Client
Details</asp:LinkButton><asp:LinkButton ID="LinkButton3" runat="server" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"

70
ForeColor="Black" PostBackUrl="~/Default.aspx"STYLE="position:absolute; top: 625px;
left: 755px; width: 149px;">Back to Home</asp:LinkButton></asp:Content>
IntruderDetails.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class Intruderdetails : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where
fmodify='Block'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{
GridView1.DataSource = ds1;
GridView1.DataBind();
}
else
{MsgBox.Show("No Intruder Alerts Found");
}}
public void bindgrid()
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where
fmodify='Block'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1;
GridView1.DataBind();}
else
{MsgBox.Show("No Intruder Alerts Found");}
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;

71
bindgrid();
}}

KeyResponses.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/TPAMasterPage.master" CodeFile="KeyResponses.aspx.cs"
Inherits="KeyResponses" %>
<asp:Content ContentPlaceHolderID="KeyResponses" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Alert Message !</marquee>
</font></asp:Panel>
<asp:Label style="position:absolute; top: 201px; left: 22px;" ID="Label1"
runat="server" Font-Italic="True" Font-Bold="True"
Font-Names="Britannic Bold" Font-Size="X-Large" Text="Key Responses:"
ForeColor="#CC3300" BackColor="#FFFFCC"></asp:Label>
<asp:GridView style="position: absolute; top: 256px; left: 87px; width: 599px;"
ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333"AllowPaging="True" PageSize="15"
onpageindexchanging="GridView1_PageIndexChanging" GridLines="None" >
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" /><Columns>
<asp:BoundField DataField="fid" HeaderText="File ID" />
<asp:BoundField DataField="ffilename" HeaderText="File Name" />
<asp:BoundField DataField="fowner" HeaderText="File Owner" />
<asp:BoundField DataField="fenccryptokey" HeaderText="GenProof key" />
<asp:BoundField DataField="fdatetime" HeaderText="Date" />
<asp:HyperLinkField HeaderText="View" Text="View" DataNavigateUrlFields="fid"
DataNavigateUrlFormatString="keyResponses1.aspx?ID={0}" /></Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333"
HorizontalAlign="Center" /><SelectedRowStyle BackColor="#FFCC66" ForeColor="Navy"
Font-Bold="True" /><HeaderStyle BackColor="#990000" Font-Bold="True"
ForeColor="White" /><AlternatingRowStyle BackColor="White" /></asp:GridView>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/tpaverify.aspx" >Alert Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/KeyResponses.aspx"
STYLE="position:absolute; top: 475px; left: 755px; width: 161px;">Key
Responses</asp:LinkButton><asp:LinkButton ID="LinkButton5" runat="server" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/Intruderdetails.aspx"
STYLE="position:absolute; top: 515px; left: 755px; width: 172px;">Intruder
Details</asp:LinkButton><asp:LinkButton ID="LinkButton4" runat="server" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"

72
ForeColor="Black" PostBackUrl="~/AdminOwnerDetails.aspx"STYLE="position:absolute;
top: 555px; left: 755px; width: 161px;">Client Details</asp:LinkButton></asp:Content>
KeyResponses.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class KeyResponses : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where
serverview='View'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1;
GridView1.DataBind();
}
else
{
MsgBox.Show("No KeyResponse Found");
}}
public void bindgrid()
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where
serverview='View'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1;
GridView1.DataBind();}
else
{MsgBox.Show("No KeyResponse Found");
}}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;

73
bindgrid();
}}
OwnerCentralRepository.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/ServerMasterPage.master"


AutoEventWireup="true" CodeFile="OwnerCentralRepository.aspx.cs"
Inherits="OwnerCentralRepository" %>
<asp:Content ID="Content1" ContentPlaceHolderID="serververify" runat="server">
<asp:Panel Style="position: absolute; top: 206px; left: 22px; height: 293px; width: 846px;
overflow:scroll"ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">File Interaction History Central Repository !</marquee>
</font><br /><br /><br /><center>
<asp:GridView ID="GridView1" runat="server"BackColor="#DEBA84"
BorderColor="#DEBA84" BorderWidth="1px"CellPadding="3" Font-Bold="True"
BorderStyle="None" CellSpacing="2"Font-Names="Times New Roman" Font-
Size="Medium" ForeColor="#0000CC">
<Columns>
<asp:TemplateField HeaderText="Fales"><ItemTemplate>
<asp:LinkButton ID="btnlinkAccepted" runat="server"onclick="btnlinkAccepted_Click"
Font-Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Medium">Trust Data
Black</asp:LinkButton></ItemTemplate></asp:TemplateField>
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<PagerStyle ForeColor="#8C4510"HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<SelectedRowStyle BackColor="#738A9C" ForeColor="White" Font-Bold="True" />
</asp:GridView></center>
</asp:Panel><br />
<asp:Label style="position:absolute; top: 211px; left: 382px;" ID="Label1"
runat="server" Font-Italic="False" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="X-Large" Text="Certificate Authority"
ForeColor="#CC3300"></asp:Label>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 885px; width: 243px;" Font-Bold="True"
Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/serververify.aspx" >key Request
Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black"
STYLE="position:absolute; top: 472px; left: 895px; width: 149px;"
PostBackUrl="~/Default.aspx">Back to Home</asp:LinkButton>
</asp:Content>

74
OwnerCentralRepository.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class OwnerCentralRepository : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (!IsPostBack)
{
SqlDataAdapter sda = new SqlDataAdapter("select
fid,fsubject,ffilename,fsizeinkb,fdatetime,fowner,tpaview,serverview,keystatus from
Registration", con);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}}
catch (Exception ex)
{
MsgBox.Show("Time out");
}}
protected void btnlinkAccepted_Click(object sender, EventArgs e)
{
try
{
con.Open();
GridViewRow gr = ((sender as LinkButton).NamingContainer as GridViewRow);
Session["oid"] = gr.Cells[1].Text.Trim();
SqlCommand cmdA = new SqlCommand("Update filearchive set Black='Trust Data Black'
where oid='" + gr.Cells[1].Text.Trim() + "'", con);
cmdA.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{

75
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(),
Guid.NewGuid().ToString(), "alert(''Invalid Authenticate');", true);
}}}
OwnerFileUpload.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/ClientMasterPage.master" CodeFile="OwnerFileUpload.aspx.cs"
ValidateRequest="false" Inherits="OwnerFileUpload" %>
<asp:Content ContentPlaceHolderID="OwnerFileUpload" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Upload Files !</marquee>
</font>
</asp:Panel>
<asp:Label style="position:absolute; top: 203px; left: 390px; height: 35px;" ID="Label1"
runat="server" Font-Italic="True" Font-Bold="True"
Font-Names="Century Schoolbook" Font-Size="XX-Large" Text="File Upload"
ForeColor="#993300" ></asp:Label>
<asp:LinkButton ID="LinkButton5" runat="server" Font-Bold="True"
Font-Names="Times New Roman" Font-Size="Large" Font-Underline="False"
ForeColor="Red" STYLE="position:absolute; top: 545px; left: 755px; width: 149px;"
PostBackUrl="~/UserttoRolesauditor.aspx" >Roles Auditer</asp:LinkButton>
<asp:Panel style="position:absolute; top: 251px; left: 266px; height: 290px; width: 430px;"
ID="Panel2" runat="server" BorderColor="#CC3300"
BorderStyle="Solid" BorderWidth="5px" >
<asp:Label style="position:absolute; top: 42px; left: 29px;" ID="Label3"
runat="server" Text="File ID : " Font-Bold="True"
Font-Names="Times New Roman" Font-Size="Large" ForeColor="Red"></asp:Label>
<asp:Label style="position:absolute; top: 40px; left: 140px;" ID="Label4"
runat="server" Font-Bold="True" Font-Names="Times New Roman"
Font-Size="Larger"></asp:Label>
<asp:Label ID="Label5" runat="server" Font-Bold="True"
style="position:absolute; top: 100px; left: 20px;" Text="Subject : "
Font-Names="Times New Roman" Font-Size="Large" ForeColor="Red"></asp:Label>
<asp:TextBox style="position:absolute; top: 100px; left: 140px; width: 190px; text-align:
center;"Font-Names="Bookman Old Style" ID="TextBox2" runat="server"></asp:TextBox>
<asp:Label style="position:absolute; top: 160px; left: 15px;" ID="Label2"
runat="server" Text="Upload File : " Font-Bold="True"
Font-Names="Times New Roman" Font-Size="Large" ForeColor="Red"></asp:Label>
<asp:FileUpload style="position:absolute; top: 160px; left: 140px; height: 24px; width:
221px;"ID="FileUpload1" runat="server" />
<asp:Label style="position:absolute; top: 250px; left: 67px; width: 327px;" ID="Label7"
runat="server" Font-Size="Medium"ForeColor="#B4045F" Font-Bold="True" Font-
Names="Verdana"></asp:Label></asp:Panel>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="#FF3300" PostBackUrl="~/ClientRegistration.aspx" >File

76
Upload</asp:LinkButton><asp:Label ID="Label8" runat="server" Text="Label"
Visible="False"></asp:Label><asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager></asp:Content>
OwnerFileUpload.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Diagnostics;
using System.Text;
using System.Security.Cryptography;
using System.IO;
using System.Net;
using System.Net.Mail;
using System.Data.SqlClient;
public partial class OwnerFileUpload : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
Class1 cs = new Class1();
Cryptography cr = new Cryptography();
float sessionfilesize;
string totalbytes;
string gMailAccount = "[email protected]";
string password = "project5";
string to;
string subject = "Cryptography Encryption Key";
string message;
string ownerid, filePath, filename, filesize, fileext, date;
string cryptographykey, fileenccryptographykey;
float filesiz = 0f;
string splitfilesize, checkfilename, yes, yes1, binary1, binary1enc, singlefilesize,s1;
string fverify = "NO", fmodify = "", fdownload = "Block", keyrequest = "Null", emailid;
protected void Page_Load(object sender, EventArgs e)
{if (!IsPostBack){
Label4.Text = Convert.ToString(cs.idgeneration1());
Label7.Visible = false;}
ownerid = (string)Session["ownerid"];}
protected void Button3_Click(object sender, EventArgs e)
{if (Label1.Text == "OK"){
//Button2.Text = "Check..";

77
//Label7.Text = "File Uploaded Status..";
//Label7.ForeColor = System.Drawing.ColorTranslator.FromHtml("#B4045F");}
else{
filename = System.IO.Path.GetFileName(FileUpload1.FileName);
if (filename == ""){
string myStringVariable1 = string.Empty;
myStringVariable1 = "select any one file";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
//File Upload TextBox is Empty?
Else
{
//filePath = Request.PhysicalApplicationPath + "Uploads/" +
System.IO.Path.GetFileName(AsyncFileUpload1.FileName);
//AsyncFileUpload1.SaveAs(filePath);
//byte[] filebytes = new byte[AsyncFileUpload1.PostedFile.InputStream.Length + 1];
//AsyncFileUpload1.PostedFile.InputStream.Read(filebytes, 0, filebytes.Length);
////byte[] filebytes = new byte[AsyncFileUpload1.PostedFile.InputStream.Length];
//fileext = System.IO.Path.GetExtension(AsyncFileUpload1.PostedFile.FileName);
filePath = Request.PhysicalApplicationPath + "Uploads/" +
System.IO.Path.GetFileName(FileUpload1.FileName);
FileUpload1.SaveAs(filePath);
byte[] filebytes = new byte[FileUpload1.PostedFile.InputStream.Length];
FileUpload1.PostedFile.InputStream.Read(filebytes, 0, filebytes.Length);
//byte[] filebytes = new byte[AsyncFileUpload1.PostedFile.InputStream.Length];
fileext = System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName);
filesiz = (float)FileUpload1.PostedFile.ContentLength / 1024;
filesize = Convert.ToString(filesiz) + " KB";
date = Convert.ToString(DateTime.Now.ToShortDateString());
totalbytes = Convert.ToString(FileUpload1.PostedFile.ContentLength);
Session["totalbytes"] = totalbytes;
sessionfilesize = (float)FileUpload1.PostedFile.ContentLength / 9;
Session["Filecontent"] = sessionfilesize;
singlefilesize = Convert.ToString(FileUpload1.PostedFile.ContentLength / 9);
s1 = Convert.ToString(singlefilesize);
Random val = new Random();
int rno = val.Next(12345, 54321);
cryptographykey = Convert.ToString(rno);
fileenccryptographykey = cr.Encrypt(cryptographykey);
//splitfilesize = Convert.ToString(filesiz);
//for (int i = 0; i < splitfilesize.Length; i++)
//{
// char c = splitfilesize[i];
// string binary = Convert.ToString(c, 2);
// binary1 = binary1 + binary;
//}
//binary1enc = cr.Encrypt(binary1);
//TextBox3.Text = binary1;
//Label9.Visible = true;
//TextBox3.Visible = true;

78
if (TextBox2.Text == ""){
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter File Subject.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
//File Subject TextBox is Empty?
else{
SqlDataAdapter adp = new SqlDataAdapter("select * from filearchive", con);
DataSet ds = new DataSet();
adp.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++){
checkfilename = ds.Tables[0].Rows[i]["ffilename"].ToString();
if (checkfilename == filename)
{
yes = "yes";
goto Outer;}
else{
yes = "no";
}}
Outer:
yes1 = "yes";
if (yes != "yes")
{
con.Open();
SqlCommand cmd = new SqlCommand("insert into filearchive values('" + Label4.Text + "','"
+ TextBox2.Text + "','" + filePath + "',@files,'" + filename + "','" + fileext + "','" + filesize +
"','" + date + "','" + ownerid + "','" + fileenccryptographykey + "','" + binary1enc + "','" +
fverify + "','" + fmodify + "','" + fdownload + "','" + keyrequest + "','" + totalbytes + "','" +
sessionfilesize + "','" + singlefilesize + "','','','','','','','','','','','','','','','','','','','','','','')", con);
cmd.Parameters.AddWithValue("@files", filebytes);
cmd.ExecuteNonQuery();
con.Close();
//filename = "";
Session["fid1"] = Label4.Text;
Label7.Text = "File Uploaded Successfully..";
Label7.Visible = true;
//Button2.Text = "OK";
Label7.ForeColor = System.Drawing.ColorTranslator.FromHtml("#088A08");
//ModalPopupExtender1.Show();
//Panel3.Visible = true;
//SqlDataAdapter adp1 = new SqlDataAdapter("select * from Registration where ownerid='"
+ (string)Session["ownerid"] + "'", con);
//DataSet ds1 = new DataSet();
//adp1.Fill(ds1);
//emailid = ds1.Tables[0].Rows[0]["emailid"].ToString();
//message = "<hr><br>" + "File Name : <b>" + filename + " ! </b><br><br>" +
"Cryptography Encryption Key is : " + "<b>" + fileenccryptographykey + "</b>";
//to = emailid;
//NetworkCredential loginInfo = new NetworkCredential(gMailAccount, password);
//MailMessage msg = new MailMessage();

79
//msg.From = new MailAddress(gMailAccount);
//msg.To.Add(new MailAddress(to));
//msg.Subject = subject;
//msg.Body = message;
//msg.IsBodyHtml = true;

//try
//{
// Label6.Visible = true;
// Label6.ForeColor = System.Drawing.ColorTranslator.FromHtml("#226116");
// Label6.Text = "File Cryptography Encryption Key Sent To Mail !";
// SmtpClient client = new SmtpClient("smtp.gmail.com");
// client.EnableSsl = true;
// client.UseDefaultCredentials = false;
// client.Credentials = loginInfo;
// client.Send(msg);
//}
//catch (Exception ex)
//{
// Label6.Visible = true;
// Label6.ForeColor = System.Drawing.ColorTranslator.FromHtml("#fa0505");
// Console.WriteLine(ex);
// Label6.Text = "OFFLINE : Failure Sending Mail !";
//}
}
else{
string myStringVariable1 = string.Empty;
myStringVariable1 = "This File Name Already Exists.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}}
Page_Load(null, EventArgs.Empty);
}}}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox2.Text = "";
//TextBox3.Visible = false;
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
//Label6.Visible = false;
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("packetsending.aspx");
}
protected void LinkButton4_Click(object sender, EventArgs e)
{
Response.Redirect("Download.aspx");
}

80
}

OwnerInteractionHistory.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/ServerMasterPage.master"


AutoEventWireup="true" CodeFile="OwnerInteractionHistory.aspx.cs"
Inherits="OwnerInteractionHistory" %>
<asp:Content ID="Content1" ContentPlaceHolderID="serververify" runat="server">
<asp:Panel Style="position: absolute; top: 206px; left: 22px; height: 293px; width: 846px;
overflow:scroll"ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Interaction History Central Repository !</marquee>
</font><br /><br /><br /><center>
<asp:GridView ID="GridView1" runat="server"
BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px"
CellPadding="2" ForeColor="Black" GridLines="None" Font-Bold="True">
<AlternatingRowStyle BackColor="PaleGoldenrod" />
<Columns>
<asp:TemplateField HeaderText="Fales">
<ItemTemplate>
<asp:LinkButton ID="btnlinkAccepted" runat="server"
onclick="btnlinkAccepted_Click" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Medium">Trust Decision
Black</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="Tan" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
</asp:GridView></center>
</asp:Panel>
<br />
<asp:Label style="position:absolute; top: 211px; left: 382px;" ID="Label1"
runat="server" Font-Italic="False" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="X-Large" Text="User Account"
ForeColor="#CC3300"></asp:Label>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 885px; width: 243px;" Font-Bold="True"
Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/serververify.aspx" >key Request
Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black"
STYLE="position:absolute; top: 472px; left: 895px; width: 149px;"

81
PostBackUrl="~/Default.aspx">Back to Home</asp:LinkButton>
</asp:Content>

OwnerInteractionHistory.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class OwnerInteractionHistory : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (!IsPostBack)
{
SqlDataAdapter sda = new SqlDataAdapter("select
oid,ownerid,gender,age,mobile,emailid,date,Black,Rank,RolesAuditor from Registration",
con);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}}
catch (Exception ex)
{
MsgBox.Show("Time out");
}}
protected void btnlinkAccepted_Click(object sender, EventArgs e)
{
try
{
con.Open();
GridViewRow gr = ((sender as LinkButton).NamingContainer as GridViewRow);
Session["oid"] = gr.Cells[1].Text.Trim();
SqlCommand cmdA = new SqlCommand("Update Registration set Black='Trust Decision
Black' where oid='" + gr.Cells[1].Text.Trim() + "'", con);
cmdA.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{

82
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(),
Guid.NewGuid().ToString(), "alert(''Invalid Authenticate');", true);
}}}
PacketSending.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/ClientMasterPage.master" CodeFile="packetsending.aspx.cs"
Inherits="packet_sending" %>
<asp:Content ContentPlaceHolderID="packetsending" runat="server"><center>
<asp:Panel style="position:absolute; top: 245px; left: 298px; height: 570px; width: 610px;"
ID="Panel3" runat="server" BorderColor="Brown" BorderWidth="1">
<asp:Label style="position:absolute; top: 12px; left: 507px; height: 24px; width: 71px;"
ID="Label41"runat="server" Text="Status" Font-Size="13pt"Font-Names="Nina" Font-
Bold="True" ForeColor="#990000"Font-Underline="True"></asp:Label>
<asp:Label ID="Label40" runat="server" Font-Bold="True" Font-Names="Nina"
Font-Size="13pt" Font-Underline="True" ForeColor="#990000"style="position:absolute;
top: 12px; left: 312px; height: 24px; width: 100px;"Text="Binary Value"></asp:Label>
<asp:Label ID="Label39" runat="server" Font-Bold="True" Font-Names="Nina"
Font-Size="13pt" Font-Underline="True" ForeColor="#990000"style="position:absolute;
top: 12px; left: 166px; height: 24px; width: 111px;"Text="Secret System"></asp:Label>
<asp:Label ID="Label38" runat="server" Font-Bold="True" Font-Names="Nina"
Font-Size="13pt" Font-Underline="True" ForeColor="#990000"style="position:absolute;
top: 12px; left: 52px; height: 24px; width: 71px;"Text="Levels"></asp:Label>
<asp:Label ID="Label13" runat="server" Font-Bold="True"Font-Names="Nina" Font-
Size="13pt" ForeColor="Black"style="position:absolute; top: 50px; left: 50px; height: 24px;
width: 71px;"Text="Level1"></asp:Label>
<asp:Label style="position:absolute; top: 90px; left: 50px; height: 24px; width: 71px;"
ID="Label14"runat="server" Text="Level2" Font-Size="13pt"Font-Names="Nina" Font-
Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 130px; left: 50px; height: 24px; width: 71px;"
ID="Label15"runat="server" Text="Level3" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 170px; left: 50px; height: 24px; width: 71px;"
ID="Label16"runat="server" Text="Level4" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 210px; left: 50px; height: 24px; width: 71px;"
ID="Label17"runat="server" Text="Level5" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 250px; left: 50px; height: 24px; width: 71px;"
ID="Label18"runat="server" Text="Level6" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 290px; left: 50px; height: 24px; width: 71px;"
ID="Label19"runat="server" Text="Level7" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 330px; left: 50px; height: 24px; width: 71px;"
ID="Label20runat="server" Text="Level8" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>
<asp:Label style="position:absolute; top: 370px; left: 50px; height: 24px; width: 71px;"
ID="Label21"runat="server" Text="Level9" Font-Size="13pt"
Font-Names="Nina" Font-Bold="True" ForeColor="Black"></asp:Label>

83
<asp:Label ID="Label25" runat="server" Font-Names="Courier New"
ForeColor="#FF3300"style="position:absolute; top: 50px; left: 485px; width: 124px; height:
20px;"></asp:Label>
<asp:Label style="position:absolute; top: 90px; left: 485px; width: 124px; height: 20px;"
ID="Label26"runat="server" Font-Names="Courier New"
ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 130px; left:
485px; width: 124px; height: 20px;" ID="Label27"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 170px;
left: 485px; width: 124px; height: 20px;" ID="Label28"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 210px;
left: 485px; width: 124px; height: 20px;" ID="Label29"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 250px;
left: 485px; width: 124px; height: 20px;" ID="Label30"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 290px;
left: 485px; width: 124px; height: 20px;" ID="Label31"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 330px;
left: 485px; width: 124px; height: 20px;" ID="Label32"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label><asp:Label style="position:absolute; top: 370px;
left: 485px; width: 124px; height: 20px;" ID="Label33"runat="server" Font-Names="Courier
New" ForeColor="#FF3300"></asp:Label>
<asp:CheckBox style="position:absolute; top: 402px; left: 230px;"ID="CheckBox1"
runat="server" Text="Packet Loss" Font-Bold="true"Font-Italic="false" Visible="False"/>
<asp:Button ID="btnSend" runat="server"style="position:absolute; top: 427px; left: 231px;
width: 82px; height: 30px;"Text="Send" BackColor="#FFCCCC" ForeColor="#CC3300"
Font-Size="13"Font-Names="Bookman Old Style" onclick="btnSend_Click" Font-
Bold="true"/><asp:Label style="position:absolute; top: 447px; left: 35px;" ID="Label3"
runat="server" Text="Note:" ForeColor="Black" Font-Underline="True"></asp:Label>
<asp:Label style="position:absolute; top: 473px; left: 67px; height: 24px; width: 160px;"
ID="Label23"runat="server" Text="Each Level is: " Font-Size="Medium" Font-Bold="True"
Font-Names="Verdana"></asp:Label><asp:Label style="position:absolute; top: 471px; left:
226px; height: 24px; width: 160px;" ID="Label24" runat="server" Font-Size="13pt" Font-
Names="Times New Roman"ForeColor="Red"></asp:Label><asp:Label ID="Label1"
runat="server" Font-Size="Medium"style="position:absolute; top: 513px; left: 63px; height:
24px; width: 160px;"Text="Total Level is: " Font-Bold="True" Font-
Names="Verdana"></asp:Label><asp:Label style="position:absolute; top: 510px; left:
230px; height: 24px; width: 160px;" ID="Label2" runat="server" Font-Size="13pt" Font-
Names="Times New Roman"ForeColor="Red"></asp:Label><asp:TextBox ID="TextBox1"
runat="server"style="position:absolute; top: 50px; left: 143px; text-align: center;"
ontextchanged="TextBox1_TextChanged" AutoPostBack="True"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"style="position:absolute; top: 90px; left:
143px; text-align: center;" AutoPostBack="True"ontextchanged="TextBox2_TextChanged">
</asp:TextBox><asp:TextBox ID="TextBox3" runat="server"style="position:absolute; top:
130px; left: 143px; text-align: center;"
AutoPostBack="True"ontextchanged="TextBox3_TextChanged" ></asp:TextBox>
<asp:TextBox ID="TextBox4" runat="server"style="position:absolute; top: 170px; left:
143px; text-align: center;" AutoPostBack="True"ontextchanged="TextBox4_TextChanged">
</asp:TextBox><asp:TextBox ID="TextBox5" runat="server"style="position:absolute; top:
210px; left: 143px; text-align: center;" AutoPostBack="True"
ontextchanged="TextBox5_TextChanged" ></asp:TextBox><asp:TextBox ID="TextBox6"

84
runat="server"style="position:absolute; top: 250px; left: 143px; text-align: center;"
AutoPostBack="True"ontextchanged="TextBox6_TextChanged" ></asp:TextBox>
<asp:TextBox ID="TextBox7" runat="server"style="position:absolute; top: 290px; left:
143px; text-align: center;" AutoPostBack="True"
ontextchanged="TextBox7_TextChanged" ></asp:TextBox>
<asp:TextBox ID="TextBox8" runat="server"
style="position:absolute; top: 330px; left: 143px; text-align: center;" AutoPostBack="True"
ontextchanged="TextBox8_TextChanged" ></asp:TextBox>
<asp:TextBox ID="TextBox9" runat="server"
style="position:absolute; top: 370px; left: 143px; text-align: center;" AutoPostBack="True"
ontextchanged="TextBox9_TextChanged" ></asp:TextBox>
<asp:Label style="position:absolute; top: 50px; left: 297px; width: 123px; height: 20px;"
ID="Label4"runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 90px; left: 297px; width: 123px; height: 20px;"
ID="Label5"runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 130px; left: 297px; width: 123px; height: 20px;"
ID="Label6" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 170px; left: 297px; width: 123px; height: 20px;"
ID="Label7" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 210px; left: 297px; width: 123px; height: 20px;"
ID="Label8" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 250px; left: 297px; width: 123px; height: 20px;"
ID="Label9" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 290px; left: 297px; width: 123px; height: 20px;"
ID="Label10" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 330px; left: 297px; width: 123px; height: 20px;"
ID="Label11" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label>
<asp:Label style="position:absolute; top: 370px; left: 297px; width: 123px; height: 20px;"
ID="Label12" runat="server" Font-Names="Courier New"
ForeColor="#660033"></asp:Label></asp:Panel>
<asp:LinkButton ID="LinkButton1" runat="server"STYLE="position:absolute; top: 432px;
left: 1015px;" Font-Bold="True"ForeColor="Red" PostBackUrl="~/Default.aspx"
Font-Names="Imprint MT Shadow" Font-Size="X-Large" >Download</asp:LinkButton>
<asp:LinkButton ID="LinkButton2" runat="server"STYLE="position:absolute; top: 467px;
left: 1024px; margin-bottom: 0px;" Font-Bold="True"Font-Names="Imprint MT Shadow"
Font-Size="Large" Font-Underline="False"ForeColor="Red" PostBackUrl="~/Default.aspx"
>Signout</asp:LinkButton>
<asp:Label style="position:absolute; top: 205px; left: 139px; width: 906px; height: 26px;"
ID="Label37"runat="server" Font-Names="Verdana" ForeColor="Blue"
Font-Bold="True" Font-Size="Large">TRUST ISSUES IN USING CRYPTOGRAPHIC
RBAC SCHEMES IN SECURE CLOUD STORAGE</asp:Label>
<asp:Label style="position:absolute; top: 418px; left: 849px;" ID="Label36"

85
runat="server" Text="." Visible="false"></asp:Label>
</center>
</asp:Content>

PacketSending.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class packet_sending : System.Web.UI.Page
{
float addsplit=0;
string tr, binary1, binary1enc, binary1enc1, binary1enc2, binary1enc3, binary1enc4,
binary1enc5, binary1enc6, binary1enc7, binary1enc8;
int count = 0;
float eachfilesize = 0f;
float efsize = 0f;
string totalbytes;
string rannum;
string p1, binary2, binary3, binary4, binary5, binary6, binary7, binary8, binary9;
string p2,p3,p4,p5;
string splitfilesize, splitfilesize1, splitfilesize2, splitfilesize3, splitfilesize4, splitfilesize5,
splitfilesize6, splitfilesize7, splitfilesize8;
Cryptography cr = new Cryptography();
string cryptographykey, fileenccryptographykey;
float filesiz = 0f;
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{if (!IsPostBack)
{Label25.Visible = false;
Label26.Visible = false;
Label27.Visible = false;
Label28.Visible = false;
Label29.Visible = false;
Label30.Visible = false;
Label31.Visible = false;
Label32.Visible = false;
Label33.Visible = false;
TextBox1.Visible = false;

86
TextBox2.Visible = false;
TextBox3.Visible = false;
TextBox4.Visible = false;
TextBox5.Visible = false;
TextBox6.Visible = false;
TextBox7.Visible = false;
TextBox8.Visible = false;
TextBox9.Visible = false;}}
protected void btnSend_Click(object sender, EventArgs e)
{try{
totalbytes = Convert.ToString(Session["totalbytes"]);
Label2.Text = Convert.ToString(Session["totalbytes"]) + " bytes";
eachfilesize = (float)Session["Filecontent"];
Label24.Text = Convert.ToString(Session["Filecontent"]) + " bytes";
Session["c"] = count;
if (Label36.Visible == false)
{if (Label27.Visible == false)
{if (CheckBox1.Checked == false)
{if (Label25.Visible == false)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label13.BackColor = System.Drawing.Color.Green;
//Label25.Visible = true;
//Label25.Text = "Block1 Sent ";
System.Threading.Thread.Sleep(1000);
TextBox1.Visible = true;
goto outer;}
if (Label25.Visible == true)
{
if (Label14.BackColor != System.Drawing.Color.Green)
{
//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label14.BackColor = System.Drawing.Color.Green;
//Label26.Visible = true;
//Label26.Text = "Block2 Sent";
System.Threading.Thread.Sleep(1000);
TextBox2.Visible = true;
goto outer;}}
if (Label26.Visible == true)
{
//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label15.BackColor = System.Drawing.Color.Green;
//Label27.Visible = true;
//Label27.Text = "Block3 Sent";
System.Threading.Thread.Sleep(1000);
TextBox3.Visible = true;
//goto outer;}
CheckBox1.Enabled = true;

87
Label27.Visible = true;}
else
{
if (CheckBox1.Checked == true)
{count++;
update();
Random val = new Random();
int rno = val.Next(1, 3);
rannum = Convert.ToString(rno);
if (rannum == "1")
{Label13.BackColor = System.Drawing.Color.Red;
Label25.Visible = true;
Label25.Text = "Level1 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "First Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label13.BackColor = System.Drawing.Color.Green;
//Label25.Visible = true;
//Label25.Text = "Block1 sent";
System.Threading.Thread.Sleep(1000);
goto outer;}
if (rannum == "2")
{Label14.BackColor = System.Drawing.Color.Red;
Label26.Visible = true;
Label26.Text = "Level2 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Second Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else{
//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label14.BackColor = System.Drawing.Color.Green;
//Label26.Visible = true;
//Label26.Text = "Block2 sent";
System.Threading.Thread.Sleep(1000);
goto outer;}
if (rannum == "3")
{Label15.BackColor = System.Drawing.Color.Red;
Label27.Visible = true;
Label27.Text = "Level3 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Third Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else

88
{
//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label15.BackColor = System.Drawing.Color.Green;
//Label27.Visible = true;
//Label27.Text = "Block3 sent";
System.Threading.Thread.Sleep(1000);
goto outer;}
CheckBox1.Checked = false;
CheckBox1.Enabled = false;}}}
else
{if (Label30.Visible == false)
{if (CheckBox1.Checked == false)
{if (Label25.Visible == false)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label13.BackColor = System.Drawing.Color.Green;
//Label25.Visible = true;
//Label25.Text = "Block1 sent";
System.Threading.Thread.Sleep(1000);
goto outer;}
if (Label25.Visible == true)
{if (Label14.BackColor != System.Drawing.Color.Green){
//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label14.BackColor = System.Drawing.Color.Green;
//Label26.Visible = true;
//Label26.Text = "Block2 sent";
System.Threading.Thread.Sleep(1000);
TextBox2.Visible = true;
goto outer;}}
if (Label26.Visible == true)
{if (Label15.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label15.BackColor = System.Drawing.Color.Green;
//Label27.Visible = true;
//Label27.Text = "Block3 sent";
System.Threading.Thread.Sleep(1000);
TextBox3.Visible = true;
goto outer;}}
if (Label27.Visible == true)
{if (Label16.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label16.BackColor = System.Drawing.Color.Green;
//Label28.Visible = true;
//Label28.Text = "Block4 sent";
System.Threading.Thread.Sleep(1000);
TextBox4.Visible = true;

89
goto outer;}}
if (Label28.Visible == true)
{if (Label17.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label17.BackColor = System.Drawing.Color.Green;
//Label29.Visible = true;
//Label29.Text = "Block5 sent";
System.Threading.Thread.Sleep(1000);
TextBox5.Visible = true;
goto outer;}}
if (Label29.Visible == true){
if (Label18.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label18.BackColor = Syste
m.Drawing.Color.Green;
//Label30.Visible = true;
//Label30.Text = "Block6 sent";
System.Threading.Thread.Sleep(1000);
TextBox6.Visible = true;
goto outer;}}
CheckBox1.Enabled = true;
//Label36.Visible = true;}
else
{count++;
update();
Session["c"] = count;
Random val = new Random();
int rno = val.Next(1, 3);
rannum = Convert.ToString(rno);
if (Label25.Visible == false)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label13.BackColor = System.Drawing.Color.Green;
//Label25.Visible = true;
//Label25.Text = "Block1 sent";
System.Threading.Thread.Sleep(1000);
TextBox1.Visible = true;
goto outer;}
if (Label25.Visible == true)
{if (Label14.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label14.BackColor = System.Drawing.Color.Green;
//Label26.Visible = true;
//Label26.Text = "Block2 sent";
System.Threading.Thread.Sleep(1000);
TextBox2.Visible = true;
goto outer;}}

90
if (Label26.Visible == true)
{if (Label15.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label15.BackColor = System.Drawing.Color.Green;
//Label27.Visible = true;
//Label27.Text = "Block3 sent";
System.Threading.Thread.Sleep(1000);
TextBox3.Visible = true;
goto outer;}}
if (rannum == "1")
{Label16.BackColor = System.Drawing.Color.Red;
Label28.Visible = true;
Label28.Text = "Level4 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Fourth Packet is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else
{if (Label16.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label16.BackColor = System.Drawing.Color.Green;
//Label28.Visible = true;
//Label28.Text = "Block4 Sent";
System.Threading.Thread.Sleep(1000);
TextBox4.Visible = true;
goto outer;}}
if (rannum == "2")
{Label17.BackColor = System.Drawing.Color.Red;
Label29.Visible = true;
Label29.Text = "Level5 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Fifth Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else
{if (Label17.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label17.BackColor = System.Drawing.Color.Green;
//Label29.Visible = true;
//Label29.Text = "Block5 Sent";
System.Threading.Thread.Sleep(1000);
TextBox5.Visible = true;
goto outer;}}
if (rannum == "3")
{Label18.BackColor = System.Drawing.Color.Red;
Label30.Visible = true;
Label30.Text = "Level6 Corrupted";

91
string myStringVariable1 = string.Empty;
myStringVariable1 = "Sixth Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else{
if (Label18.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label18.BackColor = System.Drawing.Color.Green;
//Label30.Visible = true;
//Label30.Text = "Block6 Sent ";
System.Threading.Thread.Sleep(1000);
TextBox6.Visible = true;
goto outer;}}
CheckBox1.Checked = false;
CheckBox1.Enabled = false;}}
else
{if (Label36.Visible == false)
{if (CheckBox1.Checked == false)
{if (Label25.Visible == false)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label13.BackColor = System.Drawing.Color.Green;
//Label25.Visible = true;
//Label25.Text = "Block1 Sent";
System.Threading.Thread.Sleep(1000);
TextBox1.Visible = true;
goto outer;}
if (Label25.Visible == true)
{if (Label14.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label14.BackColor = System.Drawing.Color.Green;
//Label26.Visible = true;
//Label26.Text = "Block2 Sent";
System.Threading.Thread.Sleep(1000);
TextBox2.Visible = true;
goto outer;}}
if (Label26.Visible == true)
{if (Label15.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label15.BackColor = System.Drawing.Color.Green;
//Label27.Visible = true;
//Label27.Text = "Block3 Sent";
System.Threading.Thread.Sleep(1000);
TextBox3.Visible = true;
goto outer;}}
if (Label27.Visible == true)
{if (Label16.BackColor != System.Drawing.Color.Green)

92
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label16.BackColor = System.Drawing.Color.Green;
//Label28.Visible = true;
//Label28.Text = "Block4 Sent";
System.Threading.Thread.Sleep(1000);
TextBox4.Visible = true;
goto outer;}}
if (Label28.Visible == true)
{if (Label17.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label17.BackColor = System.Drawing.Color.Green;
//Label29.Visible = true;
//Label29.Text = "Block5 Sent";
System.Threading.Thread.Sleep(1000);
TextBox5.Visible = true;
goto outer;}}
if (Label30.Visible == false)
{if (Label18.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label18.BackColor = System.Drawing.Color.Green;
//Label30.Visible = true;
//Label30.Text = "Block6 Sent";
System.Threading.Thread.Sleep(1000);
TextBox6.Visible = true;
goto outer;}}
if (Label30.Visible == true)
{if (Label19.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label19.BackColor = System.Drawing.Color.Green;
//Label31.Visible = true;
//Label31.Text = "Block7 Sent";
System.Threading.Thread.Sleep(1000);
TextBox7.Visible = true;
goto outer;}}
if (Label31.Visible == true)
{if (Label20.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label20.BackColor = System.Drawing.Color.Green;
//Label32.Visible = true;
//Label32.Text = "Block8 Sent";
System.Threading.Thread.Sleep(1000);
TextBox8.Visible = true;
goto outer;}}
if (Label32.Visible == true)
{if (Label21.BackColor != System.Drawing.Color.Green)

93
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label21.BackColor = System.Drawing.Color.Green;
//Label33.Visible = true;
//Label33.Text = "Block9 Sent";
System.Threading.Thread.Sleep(1000);
TextBox9.Visible = true;
goto outer;}}
//con.Open();
//SqlDataAdapter adp = new SqlDataAdapter("select * from filearchive where fid='" +
(string)Session["fid1"] + "'", con);
//DataSet ds = new DataSet();
//adp.Fill(ds);
//p1 = ds.Tables[0].Rows[0]["fowner"].ToString();
////SqlCommand c1 = new SqlCommand("select * from Sentfiles where Sendornot='" +
sendornotnull + "'", con);
////p2 = Convert.ToString(c1.ExecuteScalar());
//p3 = ds.Tables[0].Rows[0]["FID"].ToString();
//if(count==0)
//{
//if ((int)Session["c"] > 0)
//{
// sendornotnull = "Corrupted";
//}
//else
//{
// sendornotnull = "Success";
//}
// }
//SqlCommand cmd1 = new SqlCommand("Update Sentfiles set Sendornot='" +
sendornotnull + "'where FID='" + (string)Session["f"] + "'", con);
//cmd1.ExecuteNonQuery();
CheckBox1.Enabled = true;
Label36.Visible = true;
con.Close();}
else{
count++;
update();
Random val = new Random();
int rno = val.Next(1, 3);
rannum = Convert.ToString(rno);
if (Label25.Visible == false)
{if (Label13.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label13.BackColor = System.Drawing.Color.Green;
//Label25.Visible = true;
//Label25.Text = "Block1 Sent";
System.Threading.Thread.Sleep(1000);
TextBox1.Visible = true;

94
goto outer;}}
if (Label25.Visible == true)
{if (Label14.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label14.BackColor = System.Drawing.Color.Green;
//Label26.Visible = true;
//Label26.Text = "Block2 Sent";
System.Threading.Thread.Sleep(1000);
TextBox2.Visible = true;
goto outer;}}
if (Label26.Visible == true)
{if (Label15.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label15.BackColor = System.Drawing.Color.Green;
//Label27.Visible = true;
//Label27.Text = "Block3 Sent";
System.Threading.Thread.Sleep(1000);
TextBox3.Visible = true;
goto outer; }}
if (Label27.Visible == true)
{if (Label16.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label16.BackColor = System.Drawing.Color.Green;
//Label28.Visible = true;
//Label28.Text = "Block4 Sent";
System.Threading.Thread.Sleep(1000);
TextBox4.Visible = true;
goto outer;}}
if (Label28.Visible == true)
{if (Label17.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label17.BackColor = System.Drawing.Color.Green;
//Label29.Visible = true;
//Label29.Text = "Block5 Sent";
System.Threading.Thread.Sleep(1000);
TextBox5.Visible = true;
goto outer;}}
if (Label30.Visible == false)
{if (Label18.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label18.BackColor = System.Drawing.Color.Green;
//Label30.Visible = true;
//Label30.Text = "Block6 Sent";
System.Threading.Thread.Sleep(1000);
TextBox6.Visible = true;

95
goto outer;}}
if (rannum == "1")
{Label19.BackColor = System.Drawing.Color.Red;
Label31.Visible = true;
Label31.Text = "Level7 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Seventh Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true); }
else
{ if (Label19.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label19.BackColor = System.Drawing.Color.Green;
//Label31.Visible = true;
//Label31.Text = "Block7 Sent";
System.Threading.Thread.Sleep(1000);
TextBox7.Visible = true;
goto outer;}}
if (rannum == "2")
{Label20.BackColor = System.Drawing.Color.Red;
Label32.Visible = true;
Label32.Text = "Level8 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Eighth Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true); }
else
{if (Label20.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label20.BackColor = System.Drawing.Color.Green;
//Label32.Visible = true;
//Label32.Text = "Block8 Sent";
System.Threading.Thread.Sleep(1000);
TextBox8.Visible = true;
goto outer;}}
if (rannum == "3")
{Label21.BackColor = System.Drawing.Color.Red;
Label33.Visible = true;
Label33.Text = "Level9 Corrupted";
string myStringVariable1 = string.Empty;
myStringVariable1 = "Ninth Level is Corrupted";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true); }
else{
if (Label21.BackColor != System.Drawing.Color.Green)
{//addsplit = Convert.ToString(Convert.ToInt32(addsplit) + Convert.ToInt32(eachfilesize));
addsplit = (float)addsplit + eachfilesize;
Label21.BackColor = System.Drawing.Color.Green;

96
//Label33.Visible = true;
//Label33.Text = "Block9 Sent ";
System.Threading.Thread.Sleep(1000);
TextBox9.Visible = true;
goto outer;}}
//con.Open();
//SqlDataAdapter adp = new SqlDataAdapter("select * from Sentfiles", con);
//DataSet ds = new DataSet();
//adp.Fill(ds);
//SqlCommand c1 = new SqlCommand("select * from Sentfiles where Sendornot='" +
sendornotnull + "'", con);
//p4 = Convert.ToString(c1.ExecuteScalar());
//p5 = ds.Tables[0].Rows[0]["FID"].ToString();
//string senornot = "CORRUPTED";
//SqlCommand cmd1 = new SqlCommand("Update Sentfiles set Sendornot='" + senornot +
"'where FID='" + p3 + "'", con);
//cmd1.ExecuteNonQuery();
CheckBox1.Checked = false;
CheckBox1.Enabled = false;}}}}}
outer:
tr = "";}
catch(Exception ex)
{MsgBox.Show("Time Out, Go back Update Data");}}
public void update()
{
con.Open();
SqlCommand cmd1 = new SqlCommand("Update filearchive set Sendornot='Success',s1='" +
TextBox1.Text + "',s2='" + TextBox2.Text + "',s3='" + TextBox3.Text + "',s4='" +
TextBox4.Text + "',s5='" + TextBox5.Text + "',s6='" + TextBox6.Text + "',s7='" +
TextBox7.Text + "',s8='" + TextBox8.Text + "',s9='" + TextBox9.Text + "',m1='" +
Label4.Text + "',m2='" + Label5.Text + "',m3='" + Label6.Text + "',m4='" + Label7.Text +
"',m5='" + Label8.Text + "',m6='" + Label9.Text + "',m7='" + Label10.Text + "',m8='" +
Label11.Text + "',m9='" + Label12.Text + "' where fid='" + (string)Session["fid1"] + "'",
con);
cmd1.ExecuteNonQuery();
con.Close();}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
Random val = new Random();
int rno = val.Next(12345, 54321);
cryptographykey = Convert.ToString(rno);
fileenccryptographykey = cr.Encrypt(cryptographykey);
splitfilesize = TextBox1.Text;
for (int i = 0; i < splitfilesize.Length; i++)
{char c = splitfilesize[i];
string binary = Convert.ToString(c, 2);
binary1 = binary1 + binary;}
binary1enc = cr.Encrypt(binary1);
Label4.Text = binary1;
System.Threading.Thread.Sleep(1000);

97
Label25.Visible = true;
Label25.Text = "Block1 Sent ";}
protected void TextBox2_TextChanged(object sender, EventArgs e)
{splitfilesize1 = TextBox2.Text;
for (int i1 = 0; i1 < splitfilesize1.Length; i1++)
{char c1 = splitfilesize1[i1];
string binar1 = Convert.ToString(c1, 2);
binary2 = binary2 + binar1;}
binary1enc1 = cr.Encrypt(binary2);
Label5.Text = binary2;
System.Threading.Thread.Sleep(1000);
Label26.Visible = true;
Label26.Text = "Block2 Sent";}
protected void TextBox3_TextChanged(object sender, EventArgs e)
{splitfilesize2 = TextBox3.Text;
for (int i2 = 0; i2 < splitfilesize2.Length; i2++)
{char c2 = splitfilesize2[i2];
string binar2 = Convert.ToString(c2, 2);
binary3 = binary3 + binar2;}
binary1enc2 = cr.Encrypt(binary3);
Label6.Text = binary3;
System.Threading.Thread.Sleep(1000);
Label27.Visible = true;
Label27.Text = "Block3 Sent";
//System.Threading.Thread.Sleep(1000);
//string myStringVariable1 = string.Empty;
//myStringVariable1 = "First part is Completed.Currently " + addsplit + " bytes are sent
successfully. ";
//ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1
+ "');", true);}
protected void TextBox4_TextChanged(object sender, EventArgs e)
{splitfilesize3 = TextBox4.Text;
for (int i3 = 0; i3 < splitfilesize3.Length; i3++)
{char c3 = splitfilesize3[i3];
string binar3 = Convert.ToString(c3, 2);
binary4 = binary4 + binar3;}
binary1enc3 = cr.Encrypt(binary4);
Label7.Text = binary4;
System.Threading.Thread.Sleep(1000);
Label28.Visible = true;
Label28.Text = "Block4 Sent";}
protected void TextBox5_TextChanged(object sender, EventArgs e)
{splitfilesize4 = TextBox5.Text;
for (int i4 = 0; i4 < splitfilesize4.Length; i4++)
{char c4 = splitfilesize4[i4];
string binar4 = Convert.ToString(c4, 2);
binary5 = binary5 + binar4;}
binary1enc4 = cr.Encrypt(binary5);
Label8.Text = binary5;
System.Threading.Thread.Sleep(1000);

98
Label29.Visible = true;
Label29.Text = "Block5 Sent";}
protected void TextBox6_TextChanged(object sender, EventArgs e)
{splitfilesize5 = TextBox6.Text;
for (int i5 = 0; i5 < splitfilesize5.Length; i5++)
{char c5 = splitfilesize5[i5];
string binar5 = Convert.ToString(c5, 2);
binary6 = binary6 + binar5;}
binary1enc5 = cr.Encrypt(binary6);
Label9.Text = binary6;
System.Threading.Thread.Sleep(1000);
Label30.Visible = true;
Label30.Text = "Block6 Sent";
//System.Threading.Thread.Sleep(1000);
//string myStringVariable3 = string.Empty;
//myStringVariable3 = "Second part is Completed.Currently " + addsplit + " bytes are sent
successfully. ";
//ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable3
+ "');", true);}
protected void TextBox7_TextChanged(object sender, EventArgs e)
{splitfilesize6 = TextBox7.Text;
for (int i6 = 0; i6 < splitfilesize6.Length; i6++)
{char c6 = splitfilesize6[i6];
string binar6 = Convert.ToString(c6, 2);
binary7 = binary7 + binar6;}
binary1enc6 = cr.Encrypt(binary7);
Label10.Text = binary7;
System.Threading.Thread.Sleep(1000);
Label31.Visible = true; Label31.Text = "Block7 Sent";}
protected void TextBox8_TextChanged(object sender, EventArgs e)
{splitfilesize7 = TextBox8.Text;
for (int i7 = 0; i7 < splitfilesize7.Length; i7++)
{char c7 = splitfilesize7[i7];
string binar7 = Convert.ToString(c7, 2);
binary8 = binary8 + binar7;}
binary1enc7 = cr.Encrypt(binary8); Label11.Text = binary8;
System.Threading.Thread.Sleep(1000);
Label32.Visible = true; Label32.Text = "Block8 Sent";}
protected void TextBox9_TextChanged(object sender, EventArgs e)
{splitfilesize8 = TextBox9.Text;
for (int i8 = 0; i8 < splitfilesize8.Length; i8++)
{char c8 = splitfilesize8[i8];
string binar8 = Convert.ToString(c8, 2);
binary9 = binary9 + binar8;} binary1enc8 = cr.Encrypt(binary9);
Label12.Text = binary9;
System.Threading.Thread.Sleep(1000);
Label33.Visible = true; Label33.Text = "Block9 Sent";
System.Threading.Thread.Sleep(1000);
MsgBox.Show("File Sent to Server with Metadata key & Alert Sent to TPA ");update();
//string myStringVariable3 = string.Empty;

99
//myStringVariable3 = "File Sent to Server with Metadata key \n Alert Sent to TPA";
//ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable3
+ "');", true);}}

RolesLogin.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/TPAMasterPage.master"


AutoEventWireup="true" CodeFile="Roleslogin.aspx.cs" Inherits="Roleslogin" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminLogin" runat="server">
<asp:Label style="position:absolute; top: 216px; left: 445px;" ID="Label1"
runat="server" Text="Roles" Font-Size="14pt"Font-Names="Verdana" Font-Bold="True"
ForeColor="#CC3300"></asp:Label>
<asp:Panel style="position:absolute; width: 360px; top: 258px; left: 369px; height: 207px;"
ID="Panel1" runat="server" BorderWidth="4px" BorderColor="#CC3300"
BorderStyle="Solid">
<asp:Label style="position:absolute; top: 35px; left: 21px;" ID="Label2"
runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="Medium"
Text="Admin Id"></asp:Label>
<asp:TextBox style="position:absolute; top: 35px; left: 146px; width: 185px; height: 25px;
text-align: center;"ID="TextBox1" runat="server" Font-Names="Bookman Old Style" Font-
Size="16"></asp:TextBox>
<asp:Label style="position:absolute; top: 95px; left: 21px;" ID="Label3"
runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="Medium"
Text="Password"></asp:Label>
<asp:TextBox style="position:absolute; top: 95px; left: 146px; width: 185px; height: 25px;"
ID="TextBox2" runat="server" TextMode="Password"
Font-Names="Bookman Old Style" Font-Size="16"></asp:TextBox>
<asp:Button STYLE="position:absolute; background-color: Transparent; background-image:
url('Images/red.jpg'); top: 149px; left: 72px; width: 97px; height: 32px;"
ID="Button1" runat="server" Text="Submit" Font-Size="15pt" ForeColor="#CC3300"
Font-Names="Imprint MT Shadow" onclick="Button1_Click" Font-Bold="True" />
<asp:Button STYLE="position:absolute; background-color: Transparent; background-image:
url('Images/red.jpg'); top: 149px; left: 187px; width: 97px; height: 32px;"
ID="Button2" runat="server" Text="Clear" Font-Size="15pt" ForeColor="#CC3300"
Font-Names="Imprint MT Shadow" onclick="Button2_Click" Font-Bold="True" />
</asp:Panel>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" STYLE="position:absolute; top: 434px; left: 764px; width: 149px;"
PostBackUrl="~/Default.aspx">Back to Home</asp:LinkButton>
<cc1:DropShadowExtender ID="DropShadowExtender1" runat="server" Opacity=".1"
TargetControlID="Panel1" Rounded="true" Radius="3">
</cc1:DropShadowExtender>
<cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server"
WatermarkCssClass="watermarked" WatermarkText="Roles ID"
TargetControlID="Textbox1"></cc1:TextBoxWatermarkExtender>

100
<cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" runat="server"
WatermarkCssClass="watermarked" WatermarkText="Password"
TargetControlID="Textbox2"></cc1:TextBoxWatermarkExtender>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</asp:Content>
RolesLogin.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class Roleslogin : System.Web.UI.Page
{ string upid, uppwd;
protected void Button1_Click(object sender, EventArgs e)
{
upid = TextBox1.Text.ToUpper();
uppwd = TextBox2.Text.ToUpper();
if (TextBox1.Text == "")
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Roles ID";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);
}
else
{
if (TextBox2.Text == "")
{string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Roles Password";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);}
else
{
if (upid == "ROLES" && uppwd == "ROLES")
{Response.Redirect("tpaverify.aspx");}
else
{
string myStringVariable1 = string.Empty;
myStringVariable1 = "Enter Roles ID/Password Correcly.";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable1 +
"');", true);

101
}}}}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
}}
RolesUserAccountAuditor.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/TPAMasterPage.master"


AutoEventWireup="true" CodeFile="RolesUseraccountauditor.aspx.cs"
Inherits="RolesUseraccountauditor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminOwnerDetails" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server">
<font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">User Account List !</marquee></font></asp:Panel>
<asp:Label style="position:absolute; top: 219px; left: 321px;" ID="Label1"
runat="server" Font-Italic="False" Font-Bold="True"Font-Names="Imprint MT Shadow"
Font-Size="X-Large" Text="User Account Auditor!!!"ForeColor="#0000CC" ></asp:Label>
<asp:Label style="position: absolute; top: 270px; left: 75px;" ID="Label2"
runat="server" Text="Select User Name" Font-Bold="false" Font-Italic="False"
Font-Names="Baskerville Old Face" Font-Size="Large"></asp:Label>
<asp:DropDownList style="position: absolute; top: 301px; left: 70px; height: 25px; width:
176px;"ID="DropDownList1" runat="server" Font-Bold="True"
Font-Names="Baskerville Old Face" Font-Size="Large" AutoPostBack="True"
onselectedindexchanged="DropDownList1_SelectedIndexChanged" >
<asp:ListItem Text="--Select--" Value="--Select--" Selected="True"></asp:ListItem>
</asp:DropDownList>
<asp:Panel style="position: absolute; top: 306px; left: 254px; height: 440px; width: 433px;"
ID="Panel2" runat="server" Visible="false" BorderWidth="2"
BorderColor="#CC3300">
<asp:Label style="position: absolute; top: 40px; left: 45px;" ID="Label3"
runat="server" Text="Client ID" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 40px; left: 180px;" ID="Label4"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 40px; left: 240px;" ID="Label5"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 93px; left: 45px;" ID="Label6"
runat="server" Text="Client Name" Font-Names="Rockwell"
Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 93px; left: 180px;" ID="Label7"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 93px; left: 240px;" ID="Label8"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 146px; left: 45px;" ID="Label9"
runat="server" Text="Gender" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 146px; left: 180px;" ID="Label10"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 146px; left: 240px;" ID="Label11"

102
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 199px; left: 45px;" ID="Label12"
runat="server" Text="Age" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 199px; left: 180px;" ID="Label13"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 199px; left: 240px;" ID="Label14"runat="server"
Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 252px; left: 45px;" ID="Label15"
runat="server" Text="Mobile" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 252px; left: 180px;" ID="Label16"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 252px; left: 240px;" ID="Label17"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 305px; left: 45px;" ID="Label18"
runat="server" Text="Emailid" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 305px; left: 180px;" ID="Label19"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 305px; left: 240px;" ID="Label20"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 358px; left: 45px;" ID="Label21"
runat="server" Text="Date" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 388px; left: 45px;" ID="Label25"
runat="server" Text="Roles" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 358px; left: 180px;" ID="Label22"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 388px; left: 180px; right: 248px;" ID="Label26"
runat="server" Text=":" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 358px; left: 240px;" ID="Label23"
runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:Label style="position: absolute; top: 388px; left: 240px; height: 19px; width: 139px;"
ID="Label27"runat="server" Font-Names="Rockwell" Font-Size="Large"></asp:Label>
<asp:LinkButton ID="LinkButton7" runat="server"style="position:absolute; top: 450px; left:
-30px;" Font-Bold="True"Font-Names="Imprint MT Shadow" ForeColor="#0000CC"
onclick="LinkButton7_Click" Font-Size="X-Large" >RolesAuditor(True)</asp:LinkButton>
<asp:LinkButton ID="LinkButton8" runat="server"style="position:absolute; top: 450px; left:
220px; height: 26px; width: 243px;" Font-Bold="True"Font-Names="Imprint MT Shadow"
ForeColor="#0000CC"onclick="LinkButton8_Click" Font-Size="X-Large" >Roles
Auditor(Fales)</asp:LinkButton></asp:Panel>
<asp:LinkButton ID="LinkButton2" runat="server"STYLE="position:absolute; top: 435px;
left: 755px;" Font-Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-
Underline="False"ForeColor="Black" PostBackUrl="~/tpaverify.aspx" >Alert
Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True"Font-Names="Imprint
MT Shadow" Font-Size="Large" Font-Underline="False"ForeColor="Black"
PostBackUrl="~/KeyResponses.aspx"STYLE="position:absolute; top: 475px; left: 755px;
width: 161px;">Key Responses</asp:LinkButton>
<asp:LinkButton ID="LinkButton5" runat="server" Font-Bold="True"Font-Names="Imprint
MT Shadow" Font-Size="Large" Font-Underline="False"ForeColor="Black"
PostBackUrl="~/Intruderdetails.aspx"STYLE="position:absolute; top: 515px; left: 755px;
width: 176px;">Intruder Details</asp:LinkButton>

103
<asp:LinkButton ID="LinkButton4" runat="server" Font-Bold="True"Font-
Names="ImprintMT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/AdminOwnerDetails.aspx"STYLE="position:absolute;
top: 555px; left: 755px; width: 161px;">ClientDetails</asp:LinkButton>
</asp:Content>
RolesUserAccountAuditor

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class RolesUseraccountauditor : System.Web.UI.Page
{SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{try
{if (!IsPostBack){Label24.Visible = false;
SqlDataAdapter adp = new SqlDataAdapter("Select ownerid from Registration", con);
DataSet ds = new DataSet();adp.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{DropDownList1.Items.Add(ds.Tables[0].Rows[i]["ownerid"].ToString());}}}
catch (Exception ex)
{MsgBox.Show("Time Out");}}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{if (DropDownList1.SelectedItem.Text == "--Select--")
{Panel2.Visible = false;}else{
Panel2.Visible = true;
SqlDataAdapter adp = new SqlDataAdapter("Select * from Registration where ownerid='" +
DropDownList1.SelectedItem.Text + "'", con);
DataSet ds = new DataSet();adp.Fill(ds);
Label5.Text = ds.Tables[0].Rows[0]["oid"].ToString();
Label8.Text = ds.Tables[0].Rows[0]["ownerid"].ToString();
Label11.Text = ds.Tables[0].Rows[0]["gender"].ToString();
Label14.Text = ds.Tables[0].Rows[0]["age"].ToString();
Label17.Text = ds.Tables[0].Rows[0]["mobile"].ToString();
Label20.Text = ds.Tables[0].Rows[0]["emailid"].ToString();
Label23.Text = ds.Tables[0].Rows[0]["date"].ToString();
Label27.Text = ds.Tables[0].Rows[0]["RolesAuditor"].ToString();}}
protected void LinkButton7_Click(object sender, EventArgs e)
{con.Open();

104
SqlCommand bla = new SqlCommand("Update Registration set RolesAuditor='Roles Auditor
Successfully' where oid='" + Label5.Text + "'", con);
bla.ExecuteNonQuery();
Label24.Visible = true;
Label24.Text = "Hi "+Label8.Text+ " Roles Auditor Successfully";
con.Close();}}
ServerVerify.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/ServerMasterPage.master" CodeFile="serververify.aspx.cs"
Inherits="serververify" %>
<asp:Content ContentPlaceHolderID="serververify" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server"><font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Key Request Message !</marquee></font></asp:Panel>
<asp:Label style="position:absolute; top: 211px; left: 382px;" ID="Label1"
runat="server" Font-Italic="False" Font-Bold="True"Font-Names="Imprint MT Shadow"
Font-Size="X-Large" Text="Trust Decisio Owners Certificate"
ForeColor="#CC3300"></asp:Label><asp:GridView style="position: absolute; top: 256px;
left: 217px; width: 599px;"ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333"AllowPaging="True" PageSize="15"
onpageindexchanging="GridView1_PageIndexChanging" GridLines="None" >
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" /><Columns>
<asp:BoundField DataField="fid" HeaderText="File ID" />
<asp:BoundField DataField="ffilename" HeaderText="File Name" />
<asp:BoundField DataField="fext" HeaderText="File Type" />
<asp:BoundField DataField="fowner" HeaderText="File Owner" />
<asp:BoundField DataField="fdatetime" HeaderText="Date" />
<asp:BoundField DataField="totalbytes" HeaderText="Total Bytes" />
<asp:HyperLinkField HeaderText="Decision Authority" Text="Decision Authority"
DataNavigateUrlFields="fid"DataNavigateUrlFormatString="serververify1.aspx?ID={0}" />
</Columns><FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333"HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" ForeColor="Navy" Font-Bold="True" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" /></asp:GridView><asp:LinkButton
ID="LinkButton2" runat="server"STYLE="position:absolute; top: 435px; left: 885px; width:
243px;" Font-Bold="True"Font-Size="Large" Font-Underline="False"ForeColor="Black"
PostBackUrl="~/serververify.aspx" >key Request Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server"STYLE="position:absolute; top: 465px;
left: 885px; width: 243px;" Font-Bold="True"Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/OwnerInteractionHistory.aspx" >User Interaction
History</asp:LinkButton><asp:LinkButton ID="LinkButton4"
runat="server"STYLE="position:absolute; top: 505px; left: 885px; width: 243px;" Font-
Bold="True"Font-Size="Large" Font-Underline="False"ForeColor="Black"
PostBackUrl="~/OwnerCentralRepository.aspx" >History
CentralRepository</asp:LinkButton><asp:LinkButton ID="LinkButton5" runat="server"
Font-Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-

105
Underline="False"ForeColor="Black"STYLE="position:absolute; top: 542px; left: 895px;
width: 149px;"PostBackUrl="~/CloudReport.aspx">User Report</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black"STYLE="position:absolute; top: 582px; left: 895px; width: 149px;"
PostBackUrl="~/Default.aspx">Back to Home</asp:LinkButton>
</asp:Content>
ServerVerify.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class serververify : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where tpaview
='View'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{
GridView1.DataSource = ds1;
GridView1.DataBind();
}
else
{
MsgBox.Show("No Request Found");
}}
public void bindgrid()
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where tpaview
='View'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1;
GridView1.DataBind();}

106
else
{MsgBox.Show("No Request Found");}}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
bindgrid();
}}
TpaVerify.aspx

<%@ Page Language="C#" AutoEventWireup="true"


MasterPageFile="~/TPAMasterPage.master" CodeFile="tpaverify.aspx.cs"
Inherits="tpaverify" %><asp:Content ContentPlaceHolderID="tpaverify" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server"><font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Alert Message !</marquee></font></asp:Panel>
<asp:Label style="position:absolute; top: 207px; left: 383px;" ID="Label1"
runat="server" Font-Italic="False" Font-Bold="True"Font-Names="Britannic Bold" Font-
Size="X-Large" Text="Alert Message"></asp:Label>
<asp:GridView style="position: absolute; top: 256px; left: 87px; width: 599px;"
ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333"AllowPaging="True" PageSize="15"
onpageindexchanging="GridView1_PageIndexChanging" GridLines="None"
onselectedindexchanged="GridView1_SelectedIndexChanged" >
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" /><Columns>
<asp:BoundField DataField="fid" HeaderText="File ID" />
<asp:BoundField DataField="ffilename" HeaderText="File Name" />
<asp:BoundField DataField="fext" HeaderText="File Type" />
<asp:BoundField DataField="fowner" HeaderText="File Owner" />
<asp:BoundField DataField="fdatetime" HeaderText="Date" />
<asp:BoundField DataField="totalbytes" HeaderText="Total Bytes" />
<asp:HyperLinkField HeaderText="Certificate Roles Auditor" Text="Certificate Roles
Auditor" DataNavigateUrlFields="fid" DataNavigateUrlFormatString="tpaverify1.aspx?
ID={0}" /></Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333"HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" ForeColor="Navy" Font-Bold="True" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" /></asp:GridView>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/tpaverify.aspx" >Alert Message</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/KeyResponses.aspx"STYLE="position:absolute; top:
475px; left: 755px; width: 161px;">KeyResponses</asp:LinkButton>
<asp:LinkButton ID="LinkButton5" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/Intruderdetails.aspx"

107
STYLE="position:absolute; top: 515px; left: 755px; width: 172px;">Intruder
Details</asp:LinkButton><asp:LinkButton ID="LinkButton4" runat="server" Font-
Bold="True"Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Black" PostBackUrl="~/AdminOwnerDetails.aspx"
STYLE="position:absolute; top: 555px; left: 755px; width: 161px;">Client
Details</asp:LinkButton>
</asp:Content>
TpaVerify.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class tpaverify : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
protected void Page_Load(object sender, EventArgs e)
{
SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where tpaview!
='View'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1;
GridView1.DataBind();}
else
{MsgBox.Show("No Request Found");}}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{GridView1.PageIndex = e.NewPageIndex;
bindgrid();
update();}
public void bindgrid()
{SqlDataAdapter adp1 = new SqlDataAdapter("Select * from filearchive where tpaview!
='View'", con);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
if (ds1.Tables[0].Rows.Count > 0)
{GridView1.DataSource = ds1;
GridView1.DataBind();}
else

108
{MsgBox.Show("No Request Found");}}
public void update()
{SqlCommand cmd = new SqlCommand("update filearchieve set keystatus='sent' where
tpaview!=view", con);
cmd.ExecuteNonQuery();
con.Close();
}}
UserttoRolesauditor.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/ClientMasterPage.master"


AutoEventWireup="true" CodeFile="UserttoRolesauditor.aspx.cs"
Inherits="UserttoRolesauditor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="OwnerFileUpload" runat="server">
<asp:Panel Style="position: absolute; top: 106px; left: 22px; height: 18px; width: 959px;"
ID="Panel1" runat="server"><font size="4" face="Bookman old style" color="white">
<marquee style="position: absolute; top: -1px; left: 10px; width: 940px;" behavior="scroll"
direction="left" scrollamount="15">Upload Files !</marquee></font></asp:Panel>
<asp:Label style="position:absolute; top: 203px; left: 390px; height: 35px;" ID="Label1"
runat="server" Font-Italic="True" Font-Bold="True"Font-Names="Century Schoolbook"
Font-Size="XX-Large" Text="File Upload"ForeColor="#993300" ></asp:Label>
<asp:Panel style="position:absolute; top: 251px; left: 266px; height: 290px; width: 430px;
overflow:scroll"ID="Panel2" runat="server" BorderColor="#CC3300"
BorderStyle="Solid" BorderWidth="5px" ><center>
<asp:GridView ID="GridView1" runat="server" BackColor="#DEBA84"
BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3"
CellSpacing="2" onselectedindexchanged="GridView1_SelectedIndexChanged">
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
</asp:GridView></center></asp:Panel>
<asp:LinkButton ID="LinkButton2" runat="server"
STYLE="position:absolute; top: 435px; left: 755px;" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="#FF3300" PostBackUrl="~/ClientRegistration.aspx"
onclick="LinkButton2_Click" >FileUpload</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True"
Font-Names="Imprint MT Shadow" Font-Size="Large" Font-Underline="False"
ForeColor="Red"STYLE="position:absolute; top: 475px; left: 755px; width: 153px; height:
23px;"onclick="LinkButton1_Click">Packet Sending</asp:LinkButton>
<asp:LinkButton ID="LinkButton4" runat="server" Font-Bold="True"
Font-Names="Times New Roman" Font-Size="Large" Font-Underline="False"
ForeColor="Red" STYLE="position:absolute; top: 515px; left: 755px; width: 149px;"
PostBackUrl="~/Default.aspx" >Download</asp:LinkButton>
<asp:LinkButton ID="LinkButton5" runat="server" Font-Bold="True"
Font-Names="Times New Roman" Font-Size="Large" Font-Underline="False"
ForeColor="Red" STYLE="position:absolute; top: 545px; left: 755px; width: 149px;"
PostBackUrl="~/UserttoRolesauditor.aspx" >Roles Auditer</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True"

109
Font-Names="Times New Roman" Font-Size="Large" Font-Underline="False"
ForeColor="Red"STYLE="position:absolute; top: 575px; left: 755px; width: 149px;"
PostBackUrl="~/Default.aspx">Back to Home</asp:LinkButton>
<asp:Label ID="Label8" runat="server" Text="Label" Visible="False"></asp:Label>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</asp:Content>
UserttoRolesauditor.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Diagnostics;
using System.Text;
using System.Security.Cryptography;
using System.IO;
using System.Net;
using System.Net.Mail;
using System.Data.SqlClient;
public partial class UserttoRolesauditor : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
string ownerid;
protected void Page_Load(object sender, EventArgs e)
{
try{
if (!IsPostBack)
{
ownerid = (string)Session["ownerid"];
SqlDataAdapter sda = new SqlDataAdapter("select * from Registration where ownerid ='" +
ownerid + "'", con);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}}
catch (Exception ex)
{
MsgBox.Show("Time out");
}}

110
protected void LinkButton2_Click(object sender, EventArgs e)
{Response.Redirect("OwnerFileUpload.aspx");}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("packetsending.aspx");
}}

9. TESTING
DEFINITION

It is the process used to identify the correctness, completeness and quality of


developed computer software. It is the process of executing a program/application under
positive and negative conditions by manual or automated means. It checks for the

 Specification

 Functionality

 Performance

Debugging is that activity which is performed after executing a successful test case.
Debugging consists of determining the exact nature and location of the suspected
error and fixing the error. Debugging is probably the most difficult activity in software
development from a psychological point of view for the following reasons: Debugging is
done by the person who developed the software, and it is hard for that person to acknowledge
that an error was made. Compared to the other software-development activities,
comparatively little research, literature, and formal instruction exist on the process of
debugging of the two aspects of debugging, locating the error represents about 95% of the
activity. Hence, the rest of this section concentrates on the process of finding the location of
an error, given a suspicion that an error exists, based on the results of a successful test case.

111
9.1 OBJECTIVES

 Uncover as many as errors (or bugs) as possible in a given product.


 Demonstrate a given software product matching its requirement specifications.
 Finding defects which may get created by the programmer while developing the
software
 Gaining confidence in and providing information about level of quality
 To ensure that it satisfies the Business Requirement Specification (BRS) and System
Requirement Specification (SRS)
 To gain the confidence of customers by providing them a good quality product
 To localize an error that have been executed and corresponds to an observed faulty
behaviour
 Testing makes sure that product is being tested properly and finally produce a good
product and ready to use
 To Make sure that result meets business and user requirements
 Test cases should be designed well with maximum possibilities of finding error or
bugs

112
9.2 TEST PROCESS

Planning and control

Test control has the following major tasks:

 To measure and analyze the results of reviews and testing.


 To monitor and document progress, test coverage and exit criteria.
 To provide information on testing. To initiate corrective actions.
 To make decisions.

Analysis and design

To review the test basis. (The test basis is the information we need in order to start
the test analysis and create our own test cases. Basically it’s a documentation on which test
cases are based, such as requirements, design specifications, product risk analysis,
architecture and interfaces. We can use the test basis documents to understand what the
system should do once built.)

 To identify test conditions.


 To design the tests.
 To evaluate testability of the requirements and system.
 To design the test environment set-up and identify and required infrastructure and
tools.

Implementation and execution


113
 To execute test suites and individual test cases following the test procedures.
 To re-execute the tests that previously failed in order to confirm a fix. This is known
as confirmation testing or re-testing.
 Where there are differences between actual and expected results, it report
discrepancies as Incidents.

Evaluating exit criteria and reporting

 To check the test logs against the exit criteria specified in test planning.
 To assess if more test are needed or if the exit criteria specified should be changed.

Test closure activities

 To check which planned deliverables are actually delivered and to ensure that all
incident reports have been resolved.
 To finalize and archive test ware such as scripts, test environments, etc. for later
reuse.

9.3 TEST CASES


A test case is a set of conditions or variables under which a tester will determine
whether a system under test satisfies requirements or works correctly.The process of
developing test cases can also help find problems in the requirements or design of an
application.

Writing good test cases

114
As far as possible, write test cases in such a way that you test only one thing at a time.
Do not overlap or complicate test cases. Attempt to make your test cases ‘atomic’. Ensure
that all positive scenarios and negative scenarios are covered.
Language
 Write in simple and easy to understand language.
 Use active voice: Do this, do that.
 Use exact and consistent names (of forms, fields, etc)
Characteristics of a good test case
 Accurate: Exacts the purpose.
 Economical: No unnecessary steps or words.
 Traceable: Capable of being traced to requirements.
 Repeatable: Can be used to perform the test over and over.

9.4 TESTING TYPES


9.4.1 Black box testing
Black Box Testing, also known as Behavioural Testing, is a software testing method
in which the internal structure/design/implementation of the item being tested is not known to
the tester. These tests can be functional or non-functional, though usually functional.

115
This method is named so because the software program, in the eyes of the tester, is
like a black box; inside which one cannot see.This method of attempts to find errors in the
following categories:

 Incorrect or missing functions


 Interface errors
 Errors in data structures or external database access
 Behaviour or performance errors
 Initialization and termination errors
Example
A tester, without knowledge of the internal structures of a website, tests the web pages
by using a browser; providing inputs (clicks, keystrokes) and verifying the outputs against the
expected outcome.

Black box testing techniques


Following are some techniques that can be used for designing black box tests.
Equivalence Partitioning is a software test design technique that involves dividing
input values into valid and invalid partitions and selecting representative values from each
partition as test data.

Boundary value analysis

Boundary Value Analysis is a software test design technique that involves determination of
boundaries for input values and selecting values that are at the boundaries and just
inside/outside of the boundaries as test data.

116
Black box testing advantages
 Tests are done from a user’s point of view and will help in exposing discrepancies in
the specifications
 Tester need not know programming languages or how the software has been
implemented
Black box testing disadvantages
 Only a small number of possible inputs can be tested and many program paths will be
left untested.

9.4.2 White box testing


White Box Testing (also known as Clear Box Testing, Open Box Testing, Glass Box
Testing, Transparent Box Testing, Code-Based Testing or Structural Testing) is a software
testing method in which the internal structure/design/implementation of the item being tested
is known to the tester. The tester chooses inputs to exercise paths through the code and
determines the appropriate outputs. Programming know-how and the implementation
knowledge is essential. White box testing is testing beyond the user interface and into the
nitty-gritty of a system.
This method is named so because the software program, in the eyes of the tester, is like a
white/transparent box; inside which one clearly sees.

White Box Testing is contrasted with Black Box Testing. View Differences between
Black Box Testing and White Box Testing.

Example
A tester, usually a developer as well, studies the implementation code of a certain
field on a webpage, determines all legal (valid and invalid) AND illegal inputs and verifies
the outputs against the expected outcomes, which is also determined by studying the
implementation code.

White box testing advantages


 Testing can be commenced at an earlier stage. One need not wait for the GUI to be
available.
 Testing is more thorough, with the possibility of covering most paths.

117
White box testing disadvantages
 Since tests can be very complex, highly skilled resources are required, with thorough
knowledge of programming and implementation.

9.4.3 VERFICATION AND VALIDATION

Verification and validation are independent procedures that are used together for
checking that a product, service, or system meets requirements and specifications and that it
fulfills its intended purpose. These are critical components of a quality management
system such as ISO 9000. The words "verification" and "validation" are sometimes
preceded with "independent", indicating that the verification and validation is to be
performed by a disinterested third party.

The PMBOK guide, a standard adopted by IEEE, defines them as follows in its 4th
edition:

 "Validation. The assurance that a product, service, or system meets the needs of the
customer and other identified stakeholders. It often involves acceptance and suitability
with external customers. Contrast with verification."
 "Verification. The evaluation of whether or not a product, service, or system complies
with a regulation, requirement, specification, or imposed condition. It is often an internal
process. Contrast with validation."

118
Figure: 9.4.3.1 Required Field Validator Control

Figure:9.4.3.2 Required Field Validator Control

119
10.REPORT

Figure: 10.1 Admin Page Report

Figure: 10.2 Uploaded Documents Report

120
11.CONCLUSION

This project addressed trust issues in cryptographic Role Based Access Control
systems for securing data storage in a cloud Environment. It proposed trust models for
owners and roles in Role Based Access Control systems which are using cryptographic Role
Based Access Control schemes to secure stored data. These trust models assist owners and
roles to create flexible access policies, and cryptographic Role Based Access Control
schemes ensure that these policies are enforced in the cloud. The trust models enable the
owners and roles to determine the trustworthiness of individual roles and users in the Role
Based Access Control system respectively. They allow the data owners to use the trust
evaluation to decide whether or not to store their encrypted data in the cloud for a particular
role. The models also enable the role managers to use the trust evaluation in their decision to
grant the membership to a particular user. Another significant contribution of this paper is
that the proposed trust models take into account role inheritance and hierarchy in the
evaluation of trustworthiness of roles. As far as we are aware, this is the first time such a trust
model for role-based access control system taking into account role inheritance has been
proposed. It described the application of the trust models by considering a practical scenario
and illustrating how the trust evaluations can be used to reduce the risks and enhance the
quality of decision making by data owners and role managers of the cloud storage service.

121
12.FUTURE ENHANCEMENTS

There have only been some related works which have addressed only trust on users in
Role Based Access Control systems proposed a trust model for Role Based Access Control
system which considers users’ trust by assigning trust levels to users. These trust levels are
based on a number of factors such as user credentials, user behavior history and
recommendations from other users. Trust levels are then mapped to roles. In a trust model
for Role Based Access Control was introduced which evaluates the trust in users based on
user behaviors and context, in a context-aware access control model. Another trust model
was discussed in which also uses trust level to determine the access privileges of users. All
these trust models only consider the trust of users in a Role Based Access Control system.
None of these works address the trust for data owners on the Role Based Access Control
system itself thereby determining the trust of the roles in the Role Based Access Control
system with which they want to interact. The trust for data owners is critical in cloud
storage systems which has been addressed in this paper. As an extension of the owners’ R
Role Based Access Control trust model, our trust models have also addressed the roles’
trust on users. The existing works control the access privileges of a user depending on his
or her trust level.

122
13.REFERENCES

[1] D. F. Ferraiolo and D. R. Kuhn, “Role-based access controls,” in Proceedings of the 15th
NIST-NCSC National Computer Security Con- ference. NIST, National Computer Security
Center, October 10-13 1992, pp. 554 – 563.
[2] S. D. C. di Vimercati, S. Foresti, S. Jajodia, S. Paraboschi, and P. Samarati, “A data
outsourcing architecture combining cryptography and access control,” in Proceedings of
CSAW 2007. ACM, November 2 2007, pp. 63–69.
[3] S. D. C. D. Vimercati, S. Foresti, S. Jajodia, S. Paraboschi, and P. Samarati, “Over-
encryption: Management of access control evolution on outsourced data,” in VLDB. ACM,
September 23-27 2007, pp. 123– 134.
[4] S. Yu, C. Wang, K. Ren, and W. Lou, “Achieving Secure, Scalable, and Fine-grained
Data Access Control in Cloud Computing,” in INFOCOM. IEEE, March 15-19 2010, pp.
534–542.
[5] Y. Zhu, H. Hu, G.-J. Ahn, H. Wang, and S.-B. Wang, “Provably secure role-based
encryption with revocation mechanism,” Journal of Computer Science and Technology, vol.
26, no. 4, pp. 697–710, 2011.
[6] L. Zhou, V. Varadharajan, and M. Hitchens, “Enforcing role-based access control for
secure data storage in the cloud,” The Computer Journal, vol. 54, no. 13, pp. 1675–1687,
October 2011.
[7] L. Zhou, V. Varadharajan, and M. Hitchens, “Integrating trust with cryptographic role-
based access control for secure cloud data storage,” in TrustCom 2013. IEEE, July 2013, pp.
560–569.
[8] L. Zhou, V. Varadharajan, and M. Hitchens, “Achieving Secure Role- Based Access
Control on Encrypted Data in Cloud Storage,” IEEE Transactions on Information Forensics
and Security, vol. 8, no. 12, pp. 1947–1960, 2013.
[9] R. S. Sandhu, E. J. Coyne, H. L. Feinstein, and C. E. Youman, “Role- based access
control models,” IEEE Computer, vol. 29, no. 2, pp. 38–47, 1996.
[10] R. S. Sandhu, D. F. Ferraiolo, and D. R. Kuhn, “The NIST model for role-based access
control: towards a unified standard,” in RBAC00, ACM, 2000, pp. 47–

123

You might also like