aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/Resources/XAssetStore.migrations
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-06 00:14:21 +0000
committerJustin Clark-Casey (justincc)2012-03-06 00:14:21 +0000
commit441449e240ffceef4322661ad936928d98e3f724 (patch)
tree9a0172f705208096e3e3b208291522965c243576 /OpenSim/Data/MySQL/Resources/XAssetStore.migrations
parentremove unnecessary hash local variable (diff)
downloadopensim-SC_OLD-441449e240ffceef4322661ad936928d98e3f724.zip
opensim-SC_OLD-441449e240ffceef4322661ad936928d98e3f724.tar.gz
opensim-SC_OLD-441449e240ffceef4322661ad936928d98e3f724.tar.bz2
opensim-SC_OLD-441449e240ffceef4322661ad936928d98e3f724.tar.xz
Switch to sha256 from sha1 in order to avoid future asset hash collisions.
Some successful collision attacks have been carried out on sha1 with speculation that more are possible. http://en.wikipedia.org/wiki/Cryptographic_hash_function#Cryptographic_hash_algorithms No successful attacks have been shown on sha256, which makes it less likely that anybody will be able to engineer an asset hash collision in the future. Tradeoff is more storage required for hashes, and more cpu to hash, though this is neglible compared to db operations and network access.
Diffstat (limited to 'OpenSim/Data/MySQL/Resources/XAssetStore.migrations')
-rw-r--r--OpenSim/Data/MySQL/Resources/XAssetStore.migrations4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/Resources/XAssetStore.migrations b/OpenSim/Data/MySQL/Resources/XAssetStore.migrations
index b89eab2..d3cca5e 100644
--- a/OpenSim/Data/MySQL/Resources/XAssetStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/XAssetStore.migrations
@@ -5,7 +5,7 @@ BEGIN;
5 5
6CREATE TABLE `xassetsmeta` ( 6CREATE TABLE `xassetsmeta` (
7 `id` char(36) NOT NULL, 7 `id` char(36) NOT NULL,
8 `hash` char(64) NOT NULL, 8 `hash` binary(32) NOT NULL,
9 `name` varchar(64) NOT NULL, 9 `name` varchar(64) NOT NULL,
10 `description` varchar(64) NOT NULL, 10 `description` varchar(64) NOT NULL,
11 `asset_type` tinyint(4) NOT NULL, 11 `asset_type` tinyint(4) NOT NULL,
@@ -19,7 +19,7 @@ CREATE TABLE `xassetsmeta` (
19) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Version 1'; 19) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Version 1';
20 20
21CREATE TABLE `xassetsdata` ( 21CREATE TABLE `xassetsdata` (
22 `hash` char(64) NOT NULL, 22 `hash` binary(32) NOT NULL,
23 `data` longblob NOT NULL, 23 `data` longblob NOT NULL,
24 PRIMARY KEY (`hash`) 24 PRIMARY KEY (`hash`)
25) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Version 1'; 25) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Version 1';