[Cryptography] Network Security Part I

本文深入探讨了网络架构的基础组件,包括Hub、Switch、Router、Gateway等,解释了它们在局域网与更广泛网络之间的角色与区别。同时,介绍了防火墙的作用与网络协议的重要性,以及IPsec和Transport Layer Security在数据交换与加密过程中的应用。此外,文章还讨论了网络威胁与安全策略,旨在为读者提供全面的网络基础与安全知识。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

(1) Hub, Switch, Router, Gateway

  Hub: like center
       it can not choose which directions to go

  Switch: choose which direction they send in the LAN

  Router: forward from LAN to LAN

  Gateway: can communicate between LAN and other networks


  Gateway vs Router:

from here

     1. 概念上不是一回事。路由器是负责选择数据包转发路径的设备;而网关就是充当网络出口的设备,相当于上网要经过的关卡。这样说来,网关就是路由器的一个子模块而已。
     2. 事实上很多厂家的路由和网关都是一种设备。叫法不同,是他们根据应用场景来的。

这里写图片描述

这里写图片描述

这里写图片描述


(2) Firewalls

   special gateway
   protect from inappropriate access

(3) Network Protocols

data exchange between computers to communicate and share

这里写图片描述


(4) Network Layer Security

packet switching:
   messages are divided into fixed-size,numbered packets

IP sec:
   goals: secure traffic between two IP systems.
   保证在转发的路上是安全的

这里写图片描述

这里写图片描述

这里写图片描述

(5) Transport Layer Security

 SSL secure socket layer
 https: secure communications between browser and server

这里写图片描述

SSL

 SSL:
   data exchange and encryption

 SSL session:
     between browser and server
     created by three-hand shake protocol

 SSL connection:

这里写图片描述

这里写图片描述

这里写图片描述

这里写图片描述


(6) IPsec VS SSL

这里写图片描述


(7) Network Security Threats

这里写图片描述

### Hyperledger Fabric Token Contract Implementation and Usage In the context of blockchain technology, particularly within platforms like Hyperledger Fabric, implementing token contracts involves several key components including defining assets, transactions, and access control mechanisms. For creating tokens on Hyperledger Fabric, one approach is through chaincode (smart contract), which can be written in Go or JavaScript. #### Defining Tokens as Assets Tokens are essentially digital representations of value stored on a ledger. In Hyperledger Fabric, these can be defined using asset definitions inside smart contracts. Each token would have attributes such as owner identity, quantity, type, etc., all encapsulated within an object structure[^1]. ```go type Token struct { Owner string `json:"owner"` Amount int `json:"amount"` } ``` This code snippet demonstrates how to define a simple token with two properties: `Owner` representing the entity owning this particular set of tokens; and `Amount`, indicating the number held by said owner. #### Deploying Chaincode for Managing Tokens To deploy a new instance of your custom-built token management system onto Hyperledger Fabric network nodes requires packaging up both business logic implemented via functions alongside any necessary configuration files into what's known as "chaincode". Once packaged appropriately according to official documentation guidelines provided by IBM[^2], deployment becomes straightforward utilizing CLI tools available from the platform itself: ```bash peer chaincode install -n mytokencontract -v 1.0 -p github.com/myorg/token_contract/ peer chaincode instantiate -o orderer.example.com:7050 --tls true \ --cafile /path/to/orderers-tls-cert.pem -P "OR ('Org1MSP.member','Org2MSP.member')" ``` These commands first compile then initialize the specified version (`1.0`) of our hypothetical 'mytokencontract' under channel named 'mychannel'. The `-P` flag specifies endorsement policy ensuring only authorized parties may invoke operations against deployed instances later down line during runtime execution phase when interacting directly over RESTful APIs exposed externally outside peer processes themselves. #### Interacting With Deployed Contracts Through API Calls Once successfully instantiated across participating organizations’ peers forming part of consortium arrangement agreed upon beforehand between stakeholders involved at project initiation stage prior starting development work proper – developers now possess capability making calls towards endpoints made accessible thanks largely due efforts put forth throughout previous steps outlined above already covered earlier sections hereinbefore mentioned paragraphs preceding current section being read presently right here & now! For example, issuing new tokens might look something like below depending exact specifications laid out internally within organization responsible maintaining respective repositories hosting source codes related projects built atop hyperledger fabric framework specifically designed cater needs specific use cases encountered various industries ranging finance healthcare supply chain logistics among others: ```javascript async function issueToken(stub, args) { const { issuerId, recipientId, amount } = JSON.parse(args); let token = await stub.getState(issuerId); if (!token || !JSON.parse(token).amount >= parseInt(amount)) throw Error('Insufficient balance'); // Update Issuer Balance token = JSON.parse(token); token.amount -= parseInt(amount); await stub.putState(issuerId, Buffer.from(JSON.stringify(token))); // Create Recipient Entry If Not Exists And Add New Tokens To It. try { var recipientBalance = await stub.getState(recipientId); recipientBalance = JSON.parse(recipientBalance); } catch(e){ console.log(`Recipient ${recipientId} does not exist yet`); recipientBalance = {"amount": 0}; } recipientBalance.amount += parseInt(amount); await stub.putState(recipientId, Buffer.from(JSON.stringify(recipientBalance))); return {'status': 'success'}; } ``` The presented JavaScript method illustrates transferring ownership while adjusting balances accordingly based off input parameters passed along invocation request sent client side application layer interfacing backend services running server machines connected distributed networks powered consensus algorithms guarantee transaction integrity security features inherent design choices taken architects engineers crafting solutions leveraging decentralized ledgers technologies today modern era computing science research advancements pushing boundaries knowledge ever forward continuously evolving field study computer sciences information systems engineering software development practices methodologies frameworks libraries toolkits SDKs APIs webhooks microservices architectures cloud native applications container orchestration kubernetes helm charts gitops ci/cd pipelines devops culture agile scrum kanban lean startup principles product management strategies go-to-market plans marketing campaigns sales funnels customer support ticketing systems helpdesk workflows automation bots chatbots voice assistants virtual reality augmented reality mixed reality spatial computing human-computer interaction user experience design visual design graphic design motion graphics video production audio editing sound design music composition game engines physics simulations machine learning artificial intelligence neural networks deep learning natural language processing speech recognition image recognition pattern matching anomaly detection predictive analytics prescriptive analytics big data small data edge computing fog computing quantum computing classical computing theoretical foundations mathematics statistics probability theory combinatorics graph theory cryptography hash functions encryption decryption public keys private keys certificates authorities trust models reputation systems incentive structures economic theories behavioral economics psychology sociology anthropology linguistics philosophy ethics law regulations compliance standards certifications quality assurance testing validation verification formal methods model checking property-based testing
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值